Last time I was in that situation, it was deliberating whether to spend the night in a hotel, the airport, or the train station until 6am when the trains start back up.
I've never been in that boat but if you don't want an exorbitant Uber, it's probably cheapest to either get a hotel and take Amtrak in the morning or just rent a car. LA and SD are close enough that it often won't accrue any "one-way" fees
I only do LAX if it’s cheaper/ faster than SAN. LAX is so much better connected in terms of direct flights because of the competition the cost/time is often worth it. I’d rather sit in a cab than get stuck in ATL/DTW/SLC.