Not everything is so constrained. Lasers can get smaller. Certainly electronics. As those things get more efficient, the batteries can get smaller.
Now, it all depends on what you're trying to measure. And there are cases where the chemicals themselves cooperate with you in some way. For this reason, single purpose instruments can often be quite small. An example is the finger cuff for blood oxygen.
If you search for mini- or micro-spectrometer, you'll find that these things are all over the place. Many of them demonstrate one interesting application with great fanfare, that is perpetually almost sensitive enough for practical use.
It seems quite simple, in that it seems to use a light source and looks at the reflection using photodiodes with different lenses on top.
So as I understand it wouldn't perform as well as a spectrometer with diffraction grating and linear CCD, but would be interested to hear from someone knowledgeable about spectrometers about that.
But it does seem to use a simpler principle than a raman spectrometer, I believe this is the general term for the approach it uses - https://en.wikipedia.org/wiki/Near-infrared_spectroscopy
The only consumer product I know that resembles this is the SCiO: https://www.consumerphysics.com/scio-for-consumers/