Photonic Chips for Miniaturized Raman and Mid-Infrared Spectrometers