This study outlines the applicability of four metaheuristic algorithms, namely, whale optimization algorithm (WOA), league champion optimization (LCA), moth–flame optimization (MFO), and ant colony optimization (ACO), for performance improvement of an artificial neural network (ANN) in analyzing the bearing capacity of footings settled on two-layered soils. To this end, the models estimate the stability/failure of the system by taking into consideration soil key factors. The complexity of each network is optimized through a sensitivity analysis process. The performance of the ensembles is compared with a typical ANN to evaluate the efficiency of the applied optimizers. It was shown that the incorporation of the WOA, LCA, MFO, and ACO algorithms resulted in 14.49%, 13.41%, 18.30%, and 35.75% reductions in the prediction error of the ANN, respectively. Moreover, a ranking system is developed to compare the efficiency of the used models. The results revealed that the ACO–ANN performs most accurately, followed by the MFO–ANN, WOA–ANN, and LCA–ANN. Lastly, the outcomes demonstrated that the ACO–ANN can be a promising alternative to traditional methods used for analyzing the bearing capacity of two-layered soils.