In recent decades, there has been a substantial rise in both worldwide energy consumption and the accompanying increase in Carbon Dioxide (CO2) emissions, primarily propelled by population growth and the escalating demand for personal comfort. Operational energy consumption in buildings constitutes about 30% of the world's total final energy usage, underscoring the significance of predicting building energy usage for effective energy planning, management, and conservation. This study has enhanced the prediction of heating load (HL) and cooling loads (CL) for residential buildings using novel and dependable machine learning (ML) techniques. The study utilized two base models: Adaptive Boosting (ADA) and Extreme Gradient Boosting (XGBoost). An ensemble consisting of ADA and XGB was constructed to improve the model's performance, aligning with the principles of the Dempster-Shafer theory. To optimize the efficiency of ADA and XGB, five innovative optimizers, namely Victoria Amazonica Optimization (VAO), Giant Trevally Optimizer (GTO), Covariance Matrix Adaptation Evolution Strategy (CMAES), Coyote Optimization Algorithm (COA), and Mountain Gazelle Optimizer (MGO), were integrated. Statistical analysis has been employed to evaluate the performance of the proposed models. The results highlight the effectiveness of CMAES in optimizing the XGB and ADA models for predicting HL and CL. The most accurate result was achieved by the XGCM hybrid model, as evidenced by the impressive total R2 value of 0.9934 in HL and 0.9911 in CL prediction. The experimental findings illustrate that the suggested approach exhibits superior predictive performance across various scenarios of building energy consumption.