As long as Apple/Google maintain the ability to use the interface in iOS and Android, it will continue to work.
Also, that would be a reason for cars to come with replaceable head units.
This is a fair point... but also just what happens with technology and time.
I assume you junked the radio not because it was broken (that can happen to any gear) but because the 30-pin interface itself is no longer desired -- it's no longer the best way to get the content you want (ie: from your phone).
This isn't really a different situation from a 20-year-old car (CD player), 35-year-old car (cassette deck) or 50-year-old car (8-track).
20 years from now, if there's a market for it and it's technically possible, someone will make adapters to get AA/Carplay units to be compatible with whatever the current technology is -- basically the 2043 equivalent of a cassette adapter.
For example, I just junked a radio with a 30 pin ipod connector. It was great and smooth in its day, but now, not so much.
Could be we'll get lucky and the phones of 2043 will work with the cars of 2023, but I think it's more likely that the car will work and the infotainment stack will be a half-functional ghost mall of tech in the middle of the car