The assessment of soil–structure interaction (SSI) under dynamic loading conditions remains a challenging task due to the complexities of modeling this system and the interplay of SSI effects, which is also characterized by uncertainties across varying loading scenarios. This field of research encompasses a wide range of engineering structures, including underground tunnels. In this study, a surrogate model based on a regression ensemble model has been developed for real-time assessment of underground tunnels under dynamic loads. The surrogate model utilizes synthetic data generated using Latin hypercube sampling, significantly reducing the required dataset size while maintaining accuracy. The synthetic dataset is constructed using an accurate numerical model that integrates the two-and-a-half-dimensional singular boundary method for modeling wave propagation in the soil with the finite element method for structural modeling. This hybrid approach allows for a precise representation of the dynamic interaction between tunnels and the surrounding soil. The validation and optimization algorithms are evaluated for two problems: underground railway tunnels with circular and rectangular cross-sections, both embedded in a homogenous full-space medium. Both geometrical and material characteristics of the underground tunnel are incorporated into the optimization process. The optimization target is to minimize elastic wave propagation in the surrounding soil. The results demonstrate that the proposed optimization framework, which combines the Bayesian optimization algorithm with surrogate models, effectively explores trade-offs among multiple design parameters. This enables the design of underground railway tunnels that achieve an optimal balance between elastic wave propagation performance, material properties, and geometric constraints.