The rising heavy metal (HM) pollution in coastal aquifers in rapidly urbanizing areas such as Dammam leads to significant risks to public health and environmental sustainability, challenging compliance with Environmental Protection Agency (EPA) guidelines, World Health Organization (WHO) standards, and Sustainable Development Goals (SDGs) related to clean water and life on land. This study developed the predictive-based monitoring of HM concentrations, including cadmium (Cd), chromium (Cr), and mercury (Hg) in the coastal aquifers of Dammam, influenced by industrial, agricultural, and urban activities. For this purpose, dynamic system identification and machine learning (ML) models integrated with three ensemble techniques, namely, simple averaging (SAE), weighted averaging (WAE), and neuro-ensemble (N-ESB), were employed to enhance the accuracy, reliability, and efficiency of environmental monitoring systems. The experimental data were calibrated and validated in addition to k-fold cross-validation to ensure the predictive skills of the models. The methodology integrates extensive data collection across varied land uses in Dammam and accurate model calibration and validation phases to develop highly accurate predictive models. The findings proved that the N-ESB and Hammerstein-Wiener (HW) models surpassed other models in predicting the concentrations of all HM. For Cd, the N-ESB model achieved a root mean square error (RMSE = 0.0010mg/kg). Similarly, Cr demonstrated superior performance (RMSE = 0.0179mg/kg). Further numerical results indicated that the HW algorithm proved the most effective for Hg, with RMSE = 0.0000mg/kg. The quantitative comparison suggested that the N-ESB model's consistently high performance and low error rates make it an optimal choice for real-time, precise monitoring and management of HM pollution in coastal aquifers. The outcomes of this research highlighted the importance of integrating advanced predictive modeling techniques in environmental science, providing significant and practical implications for policymaking and ecological management.