I think the transition away from cars will be slow enough that this wont be a problem. In the ideal situation, people will just stop replacing their broken down cars.
We already deal with it somehow. Scrap them for metal, recycle rubber and probably just throw away plastic, because plastic recycling is pretty crappy.
Yeah like there are so many scrap cars with rusted out frames from previous generations, but have actual cars running that can use the parts the older car in the scrapyard has, that is the whole business model of this company Pick n Pull that operates around here for keeping old cars alive, they have a bunch of them you can pick and pull parts off of and pay per part, and this kind of thing to keep existing cars alive seems like a good way to transition instead of dumping everything which has already been tried.
In the end, the goal should never be "lets get rid of every single car", but rather "lets shift from a Car-centric design, to a active transportation & healthy living-centric design"
What if running some of them is actually more efficient than tearing them all down in terms of environmental costs/industrial throughput given the fact that smelting and recycling metals has an environmental cost in itself? Can I keep my 5 seat wagon with 2 rear facing jump seats in the cargo area that have seatbelts but are technically illegal because the trunk doesn't have a way to open it from the inside? It doesn't even get good mileage but it's a people hauler.