Ebikes are welcome on the COASTER, the commuter rail service between San Diego and Oceanside. This access is heavily utilized. Probably ditto on the Metrolink commuter rail between Oceanside and Escondido.
Don't know about the Surfliner — the Amtrak rail service linking San Diego, LA, and San Luis Obispo.
Interesting that London authorities chose foldability as their best bet for weeding out DIY and modified ebikes that might be unsafe. Surely this crude marker will be challenged.