Starting with the basics, one critical thing is that trains need to be reliable and run on time. Most people aren’t super flexible with their time. Trains need to be equal to or better than planes when it comes to delays. Unfortunately, my understanding is that this is one of the weakest points of train service in the US. I didn’t have problems with this, but I have relatives who had their trains delayed for ~12 hours… twice. Furthermore, the projected length of the delays from those working at the stations was generally “an hour or so,” and then “another hour or so,” and then “another hour or so,” and so on up until the train was finally close to the station.
From what I’ve heard, this can happen (particularly on certain lines) because freight trains have priority over passenger trains in the US. If a freight train or more needs to use the tracks, any passenger trains using the same tracks must simply wait. I’m not sure if this is the case in any other country in the world.
In all of the European countries where I’ve taken the train, I think trains are more reliable than airplanes. Of course, delays can happen, but not that frequently. That is one key factor that makes them widely used even by the middle and upper class in many of these countries.