For anyone who doesn't know: Ukraine uses Russian wide gauge (1,520 mm) as was standard in the Soviet Union, the bulk of Europe uses standard gauge (1,435 mm) modulo Baltics and Finland who are also on wide gauge, at least for regional trains (e.g. Rail Baltica will be standard gauge), and the Iberian peninsula is a complete mess of standard gauge and 1,668 mm. Which is why the Spaniards are word-leading when it comes to building multi-gauge trains.
"Mediterranean corridor" is probably specifically the TEN-T one. TEN-T lines are supposed to be standard gauge only and Ukraine is bound to have standard gauge long-distance lines in the future but it also makes sense to team up with the Spaniards to make sure there's trains that can navigate non-standard gauge on both ends. Passenger trains are fine going from what Madrid to Kiev and then you change trains to change gauges to get to your actual destination, that's not that easy with cargo wagons. Containers, sure, there reloading only takes a moment but grain hoppers and stuff you want axles that change gauge. Oh and it's not just about gauges but also signalling (broadly speaking). Trains can drive on sight but you don't want them to do that.