Student retention intention remains a concern for higher education systems worldwide and is relevant to institutional sustainability and Sustainable Development Goal 4 (SDG 4). Drawing on Human Capital Theory (HCT) and Expectancy-Value Theory (EVT), this study examines the direct and indirect associations between perceived quality teaching and student retention intention through students' self-reported knowledge, skills, competencies and student loyalty. Cross-sectional survey data were collected from 395 final-year students across Pakistani universities using a multistage sampling approach, with institutions selected through stratified random sampling and participants recruited via convenience sampling. The proposed relationships were examined using structural equation modeling with SmartPLS 4. The results indicate that perceived quality teaching is positively associated with student retention intention, both directly and indirectly through students' knowledge, skills, and competencies and student loyalty. Significant indirect associations were identified through each mediator separately and through the proposed serial mediation pathway. These findings highlight the relevance of considering students' perceived capability development and institutional attachment together when examining retention intention. HCT provides a rationale for the relationship between perceived teaching quality and students' knowledge, skills, competencies, while EVT offers an interpretive perspective; however, expectancy of success and subjective task value were not directly measured. The cross-sectional design also precludes conclusions about temporal ordering or causality. Practically, the findings suggest that faculty development, student-centered pedagogies, digitally supported teaching, and curriculum alignment with labor market needs merit consideration in institutional quality assurance. The findings provide context-specific evidence from Pakistani higher education (HE) and are relevant to SDG 4 through their focus on perceived teaching quality and students' intentions to continue their studies. They do not establish effects on actual retention or broader educational outcomes.