My first serious car purchase was a 1990 Toyota Corolla (I'm old), and it came with (ready for this?) - NO RADIO!
Really, no head unit at all. I was on a tight budget, and it all came together nicely for me to get the car. But, you can imagine that a entry level vehicle, especially from that day and age, was not exactly designed around great audio. I wanted great audio, but it wasn't something I was going to get from the factory at any price.
So, I went to an aftermarket installer and to get the speakers in the doors that I wanted, they built out the doors an extra inch to give it the room it needed for a separate woofer. They added separate tweeters up high on the door panel for better placement. They opened up the rear speaker holes to put in a larger 3-way speaker, then they custom built a 10-inch subwoofer box for the trunk. It all got wired in and installed with a 10-disc CD changer in the trunk. Sounded absolutely great. Not top dollar stuff or overboard the way some people like but a really solid system in a VERY entry level car.
Never buy a car based on the audio, but buy a car based upon the value and quality it represents to you, and if you want great audio, pass it on to an experienced installer and they will make what you want a reality. If you are concerned about this, then I would speak to an installer before you buy. Ask them if there are specific models to avoid. Ask if there are things they recommend. Challenge them.
I'm not sure if there are car audio forums which compare to A/V forums, but if you can, reach out and ask about what models or specifics to avoid. Yet, I fully believe that the response will be that you should buy a car that you love, and then let us make the audio magic for you.
A good installer seems like a magician. Yes, you will pay for that work, but you will love the end result as well.