Uncertainty quantification in complex engineering problems is challenging because of necessitating large numbers of expensive model evaluations. This paper proposes a two-stage framework for developing accurate machine learning-based surrogate models in structural engineering. The studied numerical model considers aleatory and epistemic uncertainties, i.e., ground motion features and material properties. Our framework's first step trains classification algorithms on the collected data from our numerical model with a disproportionate ratio of observations from two categories, i.e., failed and safe simulations. We investigate the performance of imbalanced learning strategies along with artificial neural networks to achieve high classification accuracy. The second step of our framework aims to estimate three quantities of interest using the same network architecture, comparing our approach with regularized linear regression models. Moreover, we present a new approach to reducing the number of numerical simulations for developing machine learning-based surrogate models with limited training data. This approach employs Gaussian processes as a powerful probabilistic technique, providing an inherent uncertainty measure to determine the quality of estimated response values. Extensive numerical experiments demonstrate the superior performance of neural networks with three hidden layers compared to traditional machine learning algorithms for both classification and regression tasks. Also, empirical investigations corroborate that Gaussian processes enable us to predict the values of missing simulations for reducing the computational cost associated with numerical models. To conclude this work, we present several applications and future research directions. INDEX TERMS Uncertainty, Gaussian processes, neural networks, imbalanced classification, regression.