Detecting exoplanets is hard enough. Getting a spectrum from one is, quite literally, adding a new dimension of difficulty.
A spectrum is simply the mapping out of the colors of light, spreading out the light from an object into its component colors. Right away, you can see why doing this with faint objects is hard. You're taking the light that would normally be concentrated into a small circle a few pixels across and then spreading it out over a line that might be hundreds or thousands of pixels long! That takes a faint object and makes it hundreds of times fainter.
Worse, when you're taking an exoplanet's spectrum, it's also sitting very close to a star that might be millions of times brighter, which totally swamps the exoplanet signal. I spent quite a bit of time years ago doing this exact thing, and it nearly drove me nuts. Nearly.
But some other astronomers were more successful than me:
they were able to tease out the spectrum of HR 8799 c in the infrared, obtaining a direct spectrum of an exoplanet for the first time. In fact, their data were good enough
to show that models of how exoplanetary atmospheres absorb and reflect their star's light must be modified!
In this picture, the star HR 8799 is shown on the left, with the position of the planet circled. The picture on the right shows the blaring spectrum of the star, some reflections called "ghosts", and the extremely faint spectrum of the planet. It really shows you just how tough this observation was.
Credit: ESO/M. Janson