For the shield tunnelling beneath an existing railway subgrade, factors such as disturbance during shield tunnel excavation can cause settlements of the existing subgrade above. Traditional prediction methods for subgrade settlement may not fully reflect the construction site conditions. Recently, machine learning has been widely applied due to its fast computation speed and accurate results. However, data-driven machine learning is considered a “black-box” algorithm, lacking a mechanical theory framework and having weak generalization capabilities. To address the limitations of machine learning and enhance the efficiency and accuracy of subgrade settlement prediction during shield tunnel construction, this paper proposes a prediction model based on a physics-informed neural network (PINN). Firstly, by integrating the non-uniform displacement mode function of the tunnel, the physical equations are constructed for the shield tunnel excavation process. Subsequently, the physical equations are coupled with the machine learning framework to develop a predictive model for shield tunnelling beneath an existing railway subgrade based on the PINN model. The performance of the proposed PINN model is evaluated through the application of two engineering cases and compared with traditional numerical simulations and data-driven machine learning. The results indicate that the proposed model can not only predict the settlement of the existing railway subgrade under scant and noisy monitoring data but also have accuracy in the inversion of tunnel displacement mode parameters. Finally, parametric analyses are conducted to reveal the influence of critical variables on the prediction performance of the PINN model.