How precise are fluorescent lamps when mass produced? Is their emitted spectrum really identical or is it possible to detect a difference between two random lamps using appropriate filters with photo-diodes to calculate the amplitude of each spectrum peak and have some kind of Id for each lamp?
It depends what aspect of the spectrum you are referring to. The wavelengths of the different emissions will be identical for all lamps of the same type, since this is dictated by physics (and chemistry): lamps will differ only if they use different working gases or phosphors. The relative intensities of the emissions will most likely vary considerably even for the same lamp with respect to supply voltage, operating temperature, and lamp ageing. I do not think that two arbitrarily chosen lamps will always be positively identifiable based on their spectra, but they will often be distinguishable from each other, at least in a minor way.
You can probably use filters and photodiodes - or a camera meter to measure intensity. (There are several free photography light-meter phone apps.)
To get a feel for spectrum at low cost then build yourself a cell phone spectrometer. I think that link is one of the original designs and that there may be improvements since.