Unhealthy dietary habits determined during childhood may represent a risk factor to many of the chronic non-communicable diseases (NCDs) in adulthood. Mediterranean Diet (MD) adherence in children and adolescents (8–16 years) living in Spain was investigated using the KIDMED questionnaire in a comparative analysis of two cross-sectional nationwide representative studies: enKid (1998–2000,n= 1001) and PASOS (2019–2020,n= 3540). Taking into account the educational level of pupils, as well as the characteristics of the place of living, a significant association was found between a KIDMED score ≥ 8 (optimal MD adherence) and primary education as well as residency in an area of <50,000 inhabitants, while living in the southern regions was associated with non-optimal MD adherence (p< 0.001). Participants of the 2019–2020 study showed an increase in the consumption of dairy products (31.1% increase), pasta/rice (15.4% increase), olive oil (16.9% increase), and nuts (9.7% increase), as well as a decreased sweets and candies intake (12.6% reduction). In contrast, a significantly lower MD adherence was found when comparing the 2019–2020 (mean ± SE: 6.9 ± 0.04) and the 1998–2000 study (7.37 ± 0.08);p< 0.001), due to less consumption of fish (20.3% reduction), pulse (19.4% reduction), and fruits (14.9% reduction), and an increased intake of commercial goods/pastries or fast-food intake (both 19.4% increase). The lowest adherence was recorded for adolescents also in the most recent study, where 10.9% of them presented a KIDMED score ≤ 3. This study shows that eating habits are deteriorating among Spanish children and adolescents. Such findings point out the urgency of undertaking strong measures to promote the consumption of healthy, sustainable, and non-ultra-processed food, such as those available in an MD, not only at a scientific and academic level, but also at a governmental one.