A little unfair to compare a country 10x the size - I would imagine its a lot easier to run good public transport over a smaller area. That said, Germany does seem to have underinvested in infrastructure a lot in the Merkel era... hopefully something that is being remedied now. The transport network is still amazing overall by global standards, even if it is frustrating for daily commuters.
I think the underinvestment has been going on for much longer than that. It's just really been starting to show more and more throughout the last ten years or so.
I'm not very optimistic with it being remedied any time soon, either. For some reason politicians have been talking about it doesn't return a profit for over a decade now.
I don't know where this reasoning came from, but it's spreading to postal service as well. Suddenly public infrastructure needs to be profitable. Unless it's parking or roads of course.
This is actually the opposite. at 10X the size, we have 30x the commuters (it scales faster than population) and 30x the demand. All of these 'car' cities used to have great streetcar or subway networks, we tore them out when we decided cars are a religion / definition of who we are.
We have it easier as a large country, and we still do the dumbest short-term thinking thing.