The rail industry is regulated. In certain ways over and in certain ways under. Eg, there's very little sense to the requirements a passenger train needs to reach to run on the same rails as freight, and Europe does it safely all the time.
The exception here in Barcelona is Line 1 which is a wider gauge than all the other lines, for historical reasons though it doesn't share any tracks (but lays right beside the train ones at some stations)
PS I didn't know the NYC metro was so big compared to the rest. Wow.
In many industries, commercial competitors discover when regulators have shirked their duties. In the rail industry, with no effective competition, many theoretical regulations are not actually enforced. This problem has gotten worse over time.
Your concerns about Amtrak may be valid, but they are orthogonal to the topic at hand.