Including security theatre, a modern conventional HSR (320~350 max speed) is competitive up to ~1000km (~600 miles), possibly 1500 but that could be over-reaching. SF-LA is well within that range, it's a shorter distance than Paris - Marseilles which is a ~3:20 trip by rail (and not the most modern line in the country/world, and one with a few stops on the way).
That's assuming euro-style cities where you probably want to go from one urban center to an other though: plane requires going outside the city (to the airport) in advance due to security procedure, waiting for security and boarding, then at the destination going from airport to city center.
With HSRs, the stations are in or relatively close to city centers (usually easily accessible through public transportation), you can arrive 5mn (or less) before departure, delays may be somewhat less common (though the justification differs e.g. suicides on the track is not an issue for planes) and you arrive at the city center with better travel comfort. Especially for people sensitive to air pressure.