Ensuring good indoor air quality in the spaces within educational centres is essential for the health and academic performance of students. In this sense, studying the evolution of health pollutants and their relationship with the environmental parameters of indoor humidity and temperature presents a challenge for the design of more efficient and comfortable buildings with a lower risk of virus infection. In this work, the relationship between pollution levels and SARS-CoV-2 virus infections in the academic year 2021/22 is shown, comparing the pollution values measured on-site with the value of the official measuring stations of the Community of Madrid. In addition, the impact of ventilation measures implemented during this period is assessed, aiming to establish guidelines for ensuring a safer and healthier school environment. It was found that during winter months, when there is less outdoor ventilation, pollution levels exceeded the recommended limits, according to reference regulations. This highlights the need for interior conditioning strategies in educational spaces. Thus, this multidimensional approach, considering both airborne pollutants and weather conditions, provides a comprehensive perspective on indoor air quality in school buildings in the central area of a metropolitan city, such as the Community of Madrid.