Isn't that a problem with testing apps on almost any platform? How many iPhone devs have every model of iPhone AND an iPad? What about PC software developers? Hell even web devs really only test on what they hope is a representative sample...
Indeed, but on some platforms it's worse than others.
If your app is intensive enough that it will have trouble running on a pre-3GS device, you'll probably know it and it'll be worth buying an old device off of eBay for testing on. At this point, there are only two significant segments of the platform (pre-3GS, post-3GS), though there are other slight differences in processing speed amongst the models. If you're requiring GPS or compass, likewise you'll know to not declare that your app will run on devices that don't have those features.
I believe the App Store review process also does some degree of testing on the various devices that the developer claims their app will run on. I'm not at all sure of how exhaustive it is, though - I know I've seen people say that games were unplayable on pre-3GS phones despite officially supporting them. This certainly seems a prime (good) case for Apple to deny acceptance to the store and I hope they do more of it in the future.
And of course this will get more complicated as time goes on and new models are introduced. But it seems unlikely that Apple will introduce models with, say, varying aspect ratios, non-integer scaled resolutions, vastly different numbers of hardware buttons, or things like hardware keyboards. Freedom and diversity are great and it is absolutely necessary for the ecosystem to continue to have platforms with high amounts of them, but they also come with a price.