In the last decades, our society has become more interdependent and complex than ever before. Local impacts can cause global issues, as the current pandemic clearly shows, affecting the health of millions of human beings. It is also highly dependent on relevant technological structures, such as communications, transport, or power distribution networks, which can be very vulnerable to the effects of Space Weather. The latter has its origin in solar activity and their associated events, such as solar flares and coronal mass ejections, which may provoke disturbances, interruptions, and even long-term damage to these technical infrastructures, with drastic social, economic and even political impacts. However, these phenomena and their effects are not yet well understood, and their forecast is still in the early stages of development. This talk will present our project, which uses a multidisciplinary approach, and which aims to deeply understand and develop an early warning system to evaluate the impact of violent solar storms on Spanish critical infrastructures such as the power transmission grid, railways, and oil and gas pipelines. Specifically, we are developing an advanced machine learning based predictive model of the impact of future solar storms on the ground. This model will consist of two distinct stages. First, we are using as input real-time data from the solar wind space probe ACE (located at the L1 point in space) to develop a deep learning model taking into account past conditions to predict the variation of the magnetic field on the Earth's surface at different locations in the Iberian Peninsula. Second, we will feed these local predictions of time-variation of the magnetic field into a physical model of the 3D Earth's geoelectrical structure to generate the geoelectrical fields that drive the geomagnetically induced currents (GICs). Thus, the ultimate goal is to provide a real-time prediction of the GICs from extreme geomagnetic storms on the Spanish critical infrastructures. This talks will show our latest results and our prospects in this field.