This research suggests a robust integration of artificial neural networks (ANN) for predicting swell pressure and the unconfined compression strength of expansive soils (PsUCS-ES). Four novel ANN-based models, namely ANN-PSO (i.e., particle swarm optimization), ANN-GWO (i.e., grey wolf optimization), ANN-SMA (i.e., slime mould algorithm) alongside ANN-MPA (i.e., marine predators’ algorithm) were deployed to assess the PsUCS-ES. The models were trained using the nine most influential parameters affecting PsUCS-ES, collected from a broader range of 145 published papers. The observed results were compared with the predictions made by the ANN-based metaheuristics models. The efficacy of all these formulated models was evaluated by utilizing mean absolute error (MAE), Nash–Sutcliffe (NS) efficiency, performance index ρ, regression coefficient (R2), root mean square error (RMSE), ratio of RMSE to standard deviation of actual observations (RSR), variance account for (VAF), Willmott’s index of agreement (WI), and weighted mean absolute percentage error (WMAPE). All the developed models for Ps-ES had an R significantly > 0.8 for the overall dataset. However, ANN-MPA excelled in yielding high R values for training dataset (TrD), testing dataset (TsD), and validation dataset (VdD). This model also exhibited the lowest MAE of 5.63%, 5.68%, and 5.48% for TrD, TsD, and VdD, respectively. The results of the UCS model’s performance revealed that R exceeded 0.9 in the TrD. However, R decreased for TsD and VdD. Also, the ANN-MPA model yielded higher R values (0.89, 0.93, and 0.94) and comparatively low MAE values (5.11%, 5.67, and 3.61%) in the case of PSO, GWO, and SMA, respectively. The UCS models witnessed an overfitting problem because the aforementioned R values of the metaheuristics were 0.62, 0.56, and 0.58 (TsD), respectively. On the contrary, no significant observation was recorded in the VdD of UCS models. All the ANN-base models were also tested using the a-20 index. For all the formulated models, maximum points were recorded to lie within ± 20% error. The results of sensitivity as well as monotonicity analyses depicted trending results that corroborate the existing literature. Therefore, it can be inferred that the recently built swarm-based ANN models, particularly ANN-MPA, can solve the complexities of tuning the hyperparameters of the ANN-predicted PsUCS-ES that can be replicated in practical scenarios of geoenvironmental engineering.