As Spaniard I wouldn't go that far.. but yeah they are good. But not all of them 😅 specially the shorter routes. Apart from some maintenance issues, It doesn't help that from time to time a line is down because they have stolen copper wires...
One tragic fact of life is that it doesn't really take that much to become world-class as far as trains go. The HSR network alone basically places you on the podium.
To be fair (and Im from a family of train workers, did my master thesis there), there is a lot of mismanagement and politics, lack of investment and stuff, which decrease the quality of train services. But there's also part of the problems who are inherent to the fact of moving steel boxes safely on thousands of km, without endangering the workers either.
I know someone that works in the rail industry with building and maintenance.
It's apparently very important to electrify the wire as soon as you are done with whatever you were doing. Otherwise someone will know that it's not electrified and they will steal it. And the company/state will lose quite a lot of money in raw materials (the overhead wires are expensive as fuck), delays and further work.
Edit: This isn't in some third world country or anything either.
This is in a rich first world country that's in the top 10 in terms of HDI and at least top 20 of pretty much every other positive index.
Because you would have to create some kind of surveillance team to find the thieves and it's generally unethical to kill people. The electricity in those wires won't just hurt, they will kill someone for just getting slightly too close.