The Talgo train with adjustable track gauges has been connecting france/spain for quite a while, but it is by no means designed for long-distance, high-speed travel so Spain kind of had to resort to switching to standard gauge which is also what other important neighbouring countries and possible destinations use (France, Germany, parts of Switzerland , Benelux, Italy).