Aims: The secondary atmospheres of terrestrial planets form and evolve as a consequence of interaction with the interior over geological time. We aim to quantify the influence of planetary bulk composition on the interior--atmosphere evolution for Earth-sized terrestrial planets to aid in the interpretation of future observations of terrestrial exoplanet atmospheres. Methods: We used a geochemical model to determine the major-element composition of planetary interiors (MgO, FeO, and SiO2) following the crystallization of a magma ocean after planet formation, predicting a compositional profile of the interior as an initial condition for our long-term thermal evolution model. Our 1D evolution model predicts the pressure-temperature structure of the interior, which we used to evaluate near-surface melt production and subsequent volatile outgassing. Volatiles are exchanged between the interior and atmosphere according to mass conservation. Results: Based on stellar compositions reported in the Hypatia catalog, we predict that about half of rocky exoplanets have a mantle that convects as a single layer (whole-mantle convection), and the other half exhibit double-layered convection due to the presence of a mid-mantle compositional boundary. Double-layered convection is more likely for planets with high bulk planetary Fe-content and low Mg/Si-ratio. We find that planets with low Mg/Si-ratio tend to cool slowly because their mantle viscosity is high. Accordingly, low-Mg/Si planets also tend to lose volatiles swiftly through extensive melting. Moreover, the dynamic regime of the lithosphere (plate tectonics vs. stagnant lid) has a first-order influence on the thermal evolution and volatile cycling. These results suggest that the composition of terrestrial exoplanetary atmospheres can provide information on the dynamic regime of the lithosphere and the thermo-chemical evolution of the interior.