The present study critically evaluates whether school leadership influences student learning homogenously regardless of school contexts. It examined relationships between four principal leadership variables (envisioning, instructional management, promoting professional development, empowerment) and two types of student outcomes (enjoyment in learning science, science achievement) in different school contexts [in terms of the availability of science resources, quality of science teachers, and school socioeconomic status (SES)]. The sample comprised 248,620 students and 9,370 principals in 35 developed countries who participated in the Programme for International Student Assessment (PISA) 2015. Latent profile analysis (LPA) showed that schools operated in three types of school contexts with different levels of science resources, proportion of quality science teachers, and school SES. There were also differences in the pattern of leadership practices across the three types of school contexts. Three-level hierarchical linear modeling (HLM) showed that among the four leadership variables, only instructional management was positively associated with students’ enjoyment of science in schools with less science resources and quality science teachers. Therefore, instructional management had compensatory effects for students in less-endowed schools. In contrast, principal leadership related to envisioning, teacher professional development, and empowerment was not positively related to students’ science learning in all three school contexts.