Earlier quoted context omitted.
Why not launch a probe and point its sensors at earth?
We hardly resolve any individual stars in other galaxies (maybe some giant stars inside Andromeda?), so our idea of chemical composition of other galaxies is very... averaged. We barely can resolve largest and closest exoplanets into a few pixels.
For now...