The rise of Industry 5.0 underscores the need to foster STEM professionals for economic progress. However, the drop in urban Pahang's upper-secondary students enrolled in Additional Mathematics poses challenges evident in STEM labor force data. Addressing this, a qualitative study, following the CRISP-DM framework, explores exogenous variables influencing Additional Mathematics enrollment. The proposed modified stacked AI predictive algorithm shows superior accuracy to benchmark algorithms. A bootstrapped paired t-test assesses underfitting and overfitting, highlighting teacher and peer influence, mathematics self-efficacy, ethnicity, and educational disciplines as significant exogenous variables. This research amplifies the importance of robust STEM initiatives, aligning with Malaysia's 60:40 STEM to non-STEM goal, contributing to technological advancement and high-income aspirations.