People always say this, but
a) even countries known for good transit like Japan still have a ton of cars for various things, and
b) there's no getting around that the money going into self-driving cars vs public transit isn't something that can really be swapped. It's coming from a different place for a different reason.
We absolutely could invest into more trains even with the SDC money flowing anyway, it's not like the SDC money is blocking it. We collectively choose not to do this, and it's not Waymo's fault.
A better idea would just be to let drivers pay the real price for the infrastructure they occupy and their negative externalities.
Then people would likely not have a issue with public transit.