This is a very valid point. Due to the small curvature of the earth, each section of the train is, at an instant, contracted in its direcetion of motion.
This means that the total length of the train must be foreshortened.
We need not think of the train as traveling at a speed very close to c. Say it travels at 1080km/h = 0.30km/s = 300m/s
Let it 'rest' length = L'
Its contracted length is now
L=L'*sqrt(1-v^2/c^2)
= L'*sqrt(1 - (300/3*10^8)^2)
= L'*sqrt(1- (10^-6)^2)
= L'*sqrt(1 - 10^-12)
L = L'(0.999999999999499999999999875)
A negligable amount?
The circumference of the Earth is approximatly 40,000km or 40,000,000m
Thus the length of the train would be
L' = 40,000,000m
Thus L = 40,000,000 * 0.999999999999499999999999875
L = 39,999,999.999979999999999995m
This is still less than a millimeter of a difference. And the train would have to travel at 1080km/h to obtain even this contraction. But this speed is approximatly the speed of rotation of the Earth about the equator. Well the Earth's rotational speed is actually 1600km/h.
So the Earth's circumference is contracted by less than a millimeter.
It would be interesting to see what happens for other planets.
But seriously, relativity says nothing about the streaths of materials. So the train might squeeze the earth