I can't speak for Spain, but I teach military history. Russia's greatest weapon when invaded was winter. Fight a delaying action until winter comes. Rail transit is a major factor in military logistics during the first and second world wars as well as several in the late 1800s.
The inability to use reliable and readily available rolling stock and motive power by invaders significantly slowed the delivery of logistics. To have a substantial and ready supply of 5 foot gauge equipment available for use immediately at the start of the invasion would be a huge drain of industrial resources the invader needed to allocate elsewhere.
Re-gauging the track would be labor intensive and still require a commitment of industrial resources.
All of this would contribute to slowing the advance of the invading power.
This was not a consideration just in the western areas of Russia/Soviet Union. They had more than just the Germans to worry about. Westerners tend to forget about the Russo-Japanese War and the threat of China in regards to Manchuria and Siberia. Russia was as ill-equipped to fight a major two front war as Germany was.
The Trans-Siberia was/is thousands of miles long. The Russians themselves only comprised 46% or so of the Russian Empire's population. Ethnic minorities had to be suppressed and moving the army to handle this task was as important as moving raw materials and crops. Labor was cheap (peasants) so that aspect of the slightly wider gauge was negligible in cost.
It made good sense at the time.
Edited 1 time(s). Last edit at 06/20/2018 07:38PM by kcsivils.