CCDs are optimized for a certain wavelength range, and for a certain expected signal level. In astronomy, we tend to be short of light, so here we almost always want them to be as sensitive as possible (an exception may be observations of the Sun, which I don't know much about). But for instance, the Nordic Optical Telescope has a CCD which is optimized for blue wavelengths, but has quite a lot fringing in the near-infrared. And further out in the IR, CCDs aren't even used, instead using something which are just called "detectors".
However, whether the CCD is used for imaging (photometry and astrometry) or spectroscopy does not have anything to do with the CCD; it's just a matter of inserting a grism or not. I'm not really into the instruments of Gaia, but I assume that differences in the CCDs are due to different wavelength regions being probed. There may be a difference in how its sub-parts (it's actually an array of CCDs) are positioned (for instance, for spectroscopy in principle you don't need a large field of view, but can do with a long array rather than a more square one), but the design of the individual CCDs are the same.