This is an intriguing question . At first sight one might think with rain and flood there will be water everywhere and since this water is full of electrolytes this could potentially lead to short circuit. read more
Actually the same question applies for the electric power transfer lines (at much higher voltage than the one used in electric trains). Water is a poor electric conductor, with mean value about σ = 0.01 S/m compared to copper with σ = 60 000 000 S/m. read more
The answer lies in spotting the two terminals from which the train draws its electricity. live terminal (positive) comes from the overhead conductors whereas the negative terminal comes from the steel tracks. read more