E.g. Shanghai - Kunming is more than 2200 km and takes between 10-12 hours[1]. At that speed LA-SF would take around 3 hours. For context the flight time is an hour and a half, so when you account for airport overhead, taxiing etc. the train would take around around the same time, and be a more pleasant mode of transport.
The density argument also goes both ways. A country like Japan is going to find it much harder to find empty space to place rail than somewhere like the US.
There's a lot of reasons for why the US isn't doing what China's doing with high-speed rail, but those reasons are mainly political, not geographical.
1. https://www.travelchinaguide.com/china-trains/shanghai-kunmi...