Yes. This is one way to look for unusual types of matter.
DETECTION OF AN UNIDENTIFIED EMISSION LINE IN THE STACKED X-RAY SPECTRUM OF GALAXY CLUSTERS The Astrophysical Journal, 789:13 (23pp), 2014 July 1 Bulbul et al.
As for dark matter, 80 yr from its discovery by (Zwicky 1933, 1937),
its nature is still unknown (though now we do know for sure it exists,
from X-ray and gravitational-lensing observations of the Bullet
Cluster; Clowe et al. 2006, and we know accurately its cosmological
abundance, e.g., Hinshaw et al. 2013). Among the various plausible
dark matter candidates, one that has motivated our present work is the
hypothetical sterile neutrino that is included in some extensions to
the standard model of particle physics...
In this paper, we undertake a fishing expedition that combines the
spectra of many bright clusters from the XMM-Newton archive in order
to search for any kind of faint, unidentified X-ray emission lines—be
they thermal lines from previously undetected rare elements in the ICM
( intracluster/intergalactic medium ) or the elusive sterile neutrino
I really like "fishing expediton" which so often is used as a pejorative insult when applied to science. Not here. Know thyself!
The premise is exactly as you lay out. The spectral lines associated with a type of matter characterize that type of matter. You could use the presence of unaccounted-for spectral lines to deduce the presence of previously unknown matter. Chem stack has a fine overview.
This overview refers to the Sharp series and other series which characterizes emission spectra according to the electron shells of the emitting atom or ion. The spectrum of an emitter is not random but arises from its structure. Heady stuff. But I take away that one could derive the nature of an element emitter from the emission.
Lines will differ for different ions of an element and different isotopes. Lines can be frequency shifted according to the speed (relative to the viewer) of the emitting atom - an example is the accretion discs of black holes, where the known spectrum of iron is shifted both coming and going and that shift can be used to calculate the rotational speed of the disc.
Whether nonbaryonic matter has associated brightline spectra is not clear. Dark matter must not do it like baryonic matter or it would be visible! "Undiscovered elements" is questionable given how predictable our familiar elements seem to be. That there could be undiscovered forms of matter not on the periodic table is not questionable at all and a lot of money is spent on searching for these particles.