We establish spectral rigidity for spherically symmetric manifolds with boundary and interior interfaces determined by discontinuities in the metric under certain conditions. Rather than a single metric, we allow two distinct metrics in between the interfaces enabling the consideration of two wave types, like P -and S -polarized waves in isotropic elastic solids. Terrestrial planets in our solar system are approximately spherically symmetric and support toroidal and spheroidal modes. Discontinuities typically correspond with phase transitions in their interiors. Our rigidity result applies to such planets as we ensure that our conditions are satisfied in generally accepted models in the presence of a fluid outer core. The proof is based on a novel trace formula.