Random scattering of light in disordered media can be used for highly sensitive speckle-based wavemeters and spectrometers. However, the multiple scattering events that fold long optical paths within a compact space also make such devices exceedingly sensitive to vibrations and small disturbances to the disordered media. Here, we show how scattering can be engineered so that it can be used for a compact computational spectrometer that is largely insensitive to environmental factors. We designed and fabricated a three-dimensional pseudo-random nano-void pattern with 62% scattering efficiency. The controlled amount of multiple scattering ensured a sufficiently long optical path for the target resolution of 100 pm, with optimal long-term stability. The 200-μm-thick scattering silica substrate was integrated in a compact assembly with a low-cost camera sensor. The target resolution was achieved for full spectrum measurements while single wavelengths could be determined with 50 pm resolution. Such tailored scattering systems can improve the trade-off among cost, size, stability, and spectral resolution in computational spectrometers.