The objective of this study is to develop a broadly applicable, high-precision, and robust prediction model for the drying shrinkage of recycled aggregate concrete, a material that exhibits significantly greater shrinkage compared to natural aggregate concrete due to its complex characteristics. To achieve this, the study began by selecting relevant characteristic parameters based on international concrete codes, followed by the application of various machine learning algorithms including Backpropagation Neural Network, Support Vector Machine, Random Forest, eXtreme Gradient Boosting, Gaussian Process Regression, k-Nearest Neighbor, Linear Regression, and Long Short-Term Memory to model and forecast the drying shrinkage of recycled aggregate concrete. Subsequently, the SHapley Additive exPlanations (SHAP) method was employed to identify the crucial factors influencing RAC drying shrinkage, such as drying age, elastic modulus, and water-binder ratio, thereby optimizing the input parameters of the ML model. To further enhance the XGBoost algorithm, the sparrow search algorithm (SSA) and the whale optimization algorithm (WOA) were utilized. The optimized WOA-XGBoost model exhibits superior predictive performance, with a determination coefficient of 0.980 and a mean ratio of predicted to experimental values of 1.025, significantly outperforming traditional specification models. The model's applicability may be limited since the dataset is mainly derived from laboratory conditions, which may differ from actual engineering environments. Future research could consider different types of recycled aggregates and curing conditions and test the model on larger data sets to improve its robustness and applicability.