I’m not an astronomer, but I’d hypothesize that the composition of the non-solar objects in a solar system (eg. a comet) is different from the composition of the sun in that solar system.
The spectra we receive will include the absorption lines from passing through the stuff around the other sun and surrounding matter. I don't know how strong the effect will be, but it should be observable.