Supposing a train gets accelerated
Let's pause there for a moment. In Special Relativity, simultaneity is relative. That means that two event that appear simultaneous in one inertial reference frame are generally not simultaneous in another reference frame.
This means that if two ends of a train began accelerating together in one inertial reference frame, they will not have started accelerating together in a difference inertial reference frame. Things will get very confusing if we don't follow this simple rule.
Whenever attempting to solve problems in Special Relativity, always use the full Lorentz transformation to find out what the space and time coordinates are for each event in each coordinate system that is of interest.
Don't simply use the abbreviated ideas such as "length" contracts, or "time" dilates. While these abbreviated ideas are true, then leave a lot of important information about what is happening out of view.
End of Rule.
As observed from an observer in the initial rest frame, will the contraction bring both sides of the train closer to the center (looking like the rear is moving a bit faster, and the front a bit slower)?
The answer depends upon how the two ends of the train move in the initial rest frame. ONE possibility is that the two ends will not accelerate simultaneously in the rest frame. The back end may accelerate first, causing the back end to accelerate to a speed sooner than the front. The advantage of this type of acceleration is that the train does not get stretched in its own frame (which might cause it to break apart).
Another possibility is that the two ends accelerate "simultaneously" according the the initial rest frame. While this has an appeal to the naive understanding, this means that the two ends will always have the same distance in the rest frame. That means that the train will get stretched in its own frames. Also from its own frames (while moving), the front began accelerating first. (This second possibility is probably not what you mean when you describe a train as accelerating.)
What about two trains, one just in front of the other, both accelerated with the same acceleration, starting at the same time.
We must ask "both accelerated with the same acceleration" and "starting at the same time" in what inertial frames?
Will the observer at rest observe a gap growing between them as they gain speed?
As before the answer depends upon what you mean by "starting at the same time", and "with the same acceleration".