Low-energy ($<$ 300 keV) protons entering the field of view of XMM-Newton can scatter with the X-ray mirror surface and reach the focal plane. They are observed in the form of a sudden increase in the background level, the so-called soft proton flares, affecting up to 40<!PCT!> of the mission observing time. Soft protons can hardly be disentangled from true X-ray events and cannot be rejected on board. All future high throughput grazing incidence X-ray telescopes operating outside the radiation belts are potentially affected by soft proton-induced contamination that must be foreseen and limited since the design phase. In-flight XMM-Newton 's observations of soft protons represent a unique laboratory to validate and improve our understanding of their interaction with the mirror, optical filters, and X-ray instruments. At the same time, such models would link the observed background flares to the primary proton population encountered by the telescope, converting XMM-Newton into a monitor for soft protons. We built a Geant4 simulation of XMM-Newton including a verified mass model of the X-ray mirror, the focal plane assembly, and the EPIC MOS and pn-CCDs. Analytical computations and, when available, laboratory measurements collected from literature were used to verify the correct modelling of the proton scattering and transmission to the detection plane. Similarly to the instrument X-ray response, we encoded the energy redistribution and proton transmission efficiency into a redistribution matrix file (RMF), mapping the probability that a proton from 2 to 300 keV is detected in a certain detector channel, and an auxiliary response file (ARF), storing the grasp towards protons. Both files were formatted according to the standard NASA calibration database and any compliant X-ray data analysis tool can be used to simulate or analyse soft proton-induced background spectra. An overall systematic uncertainty of 30<!PCT!> was assumed on the basis of the estimated accuracy of the mirror geometry and transmission models. For the validation, three averaged soft proton spectra, one for each filter configuration, were extracted from a collection of 13 years of MOS observations of the focused non X-ray background and analysed with Xspec . A similar power-law distribution is found for the three filter configurations, plus black-body-like emission below tens of keV used as a correction factor, based on the dedicated spectral analysis of 55 in-flight proton flares presented in Paper II. The best-fit model is in agreement with the power-law distribution predicted from independent measurements for the XMM-Newton orbit, spent mostly in the magnetosheath and nearby regions. For the first time we are able to link detected soft proton flares with the proton radiation environment in the Earth's magnetosphere, while proving the validity of the simulation chain in predicting the background of future missions. Benefiting from this work and contributions from the Athena instrument consortia, we also present the response files for the Athena mission and updated estimates for its focused charged background.