Climate change factors such as wet or dry, cold or warm seasons have a significant impact on both the economy and culture. Extreme rainfall events have historically posed a major threat to many parts of the world. In Bangladesh, during monsoon seasons, wet southern airflows from the Bay of Bengal collide with dry mainland air, causing heavy rainfall that negatively affects various socio-economic sectors. These include agriculture, food production, urban planning, energy, water resource management, fisheries, forest management, healthcare, disaster management, transportation, tourism, sports, and leisure. To address this issue, the paper proposes a machine-learning approach to forecast rainfall in Bangladesh using multiple regression models and a novel Stacked Ensemble Model (KGR Stacking). The study also investigates the relationship between rainfall and temperature. The KGR Stacking model outperforms the other 12 regression models, achieving an accuracy of 86.43% and lower error.