Tesla's R&D spending is about US$3 billion per year.
https://www.macrotrends.net/stocks/charts/TSLA/tesla/research-development-expenses
The annual operating costs for London's TfL is about £8 billion / $10 billion.
https://tfl.gov.uk/info-for/media/press-releases/2023/march/annual-budget-for-2023-24-shows-tfl-set-to-deliver-operating-surplus
I don't know how much other companies spent. Let's say 10x in total.
If all the collective money spent on self driving cars were spent on public transport it would maybe get you the equivalent of 3 large cities' worth of public transport worldwide.
Better than nothing, but hardly transformative.