<p>In the era of climate change-induced extreme rainfall events, the world faces unprecedented natural hazards, notably flooding. These events pose multifaceted risks to life, agriculture, infrastructure, and the well-being of society. Understanding and predicting extreme rainfall events are critical for achieving sustainable development and building resilient communities. This study employed advanced statistical techniques, specifically the generalized extreme value distribution (GEVD) and generalized Pareto distribution (GPD), using a Bayesian approach, to model and forecast annual maximum monthly rainfall in Somalia. Utilizing data spanning from 1901 to 2022, the rainfall extremes were fitted to both GEVD and GPD models using Bayesian Markov chain Monte Carlo (MCMC) simulations. Due to the lack of specific prior information, non-informative and independent priors were used to estimate posterior densities, ensuring objectivity and data-driven results, and minimizing subjective bias. Model comparisons were conducted using the deviance information criterion (DIC), prediction errors, and <italic>k</italic>-fold cross-validation. Findings reveal the robustness of the GEVD model in forecasting and predicting rainfall extremes in Somalia. Diagnostic plots confirmed the goodness of fit of the chosen model. Remarkably, the Bayesian GEVD return level estimation suggested that extreme rainfall could exceed 106 mm, 163 mm, and 195 mm for return periods of 10, 50, and 100 years, respectively. These precise return level estimates may benefit urban planners, civil engineers, and policymakers. Armed with this knowledge, they can design resilient infrastructure and buildings capable of withstanding the most extreme climatic conditions. Therefore, this study provides critical information for fostering sustainable development and resilience against climate-induced challenges in Somalia and beyond. Accurate estimation of extreme rainfall return levels enables effective mitigation of flooding risks and supports climate-resilient urban planning, civil engineering, and policymaking. These findings also inform strategies to optimize drainage systems, fortify infrastructure, and develop adaptive policies, thereby safeguarding lives, livelihoods, and infrastructure amidst escalating climate uncertainties.</p>