Here's one way to look at that: for almost any priority you have in what you want in your phone, and for almost any task you want it to do, you can find at least one Android phone that is superior in at least that one aspect. On top of that, every Android device is inherently more flexible and can largely be tailored to the individual needs of the user even without rooting or jailbreaking. That should cover your question from pretty much every angle short of picking out every example of every phone that is better in some way than the iPhone, which I think would be tedious and unnecessary here.
There are two (incorrect) assumptions that you're making here. One is that people shop on specs. They don't, no matter how badly everyone wants to convince themselves that they do. If they did, there would be zero reason why iPhone is so successful sales-wise. I know it's hard to admit it, but no one cares about specs. If they were looking at purely specs, the iPhone would be a laughable device indeed. I mean 800MHz processor?? 512MB of RAM?? A 3.5 inch screen?? No LTE?? Why would anyone buy this clearly "outdated" phone? The reason? Because no one cares about specs (of course, to some people the reason is because Apple has brainwashed multi-millions of people). The second incorrect assumption you made was that people are willing to shop on a per spec basis, which is also false. People want the whole package. Telling me that their are 20 Android phones, and each one can do at least one thing better then iPhone doesn't mean anything. Would you buy a phone with amazing speed, a huge screen and LTE if it lasted 2 hrs on battery? Or would you buy a phone with 50hrs of battery life that lagged uncontrollably nonstop? I wouldn't. Specs mean nothing. I put more weight in benchmarks, and sales then I do in spec sheets.
If quality, or even suitability to consumer needs were the main factor in iPhone sales, we shouldn't expect them to be so extremely high, since for a majority of consumers there should be at least one product that is arguably better. On top of that, we keep hearing news stories on how Android is taking more and more of the iPhone's market share. If high iPhone sales mean that Apple is doing something right other than marketing their devices, wouldn't that shrinking market share mean they've been doing much more wrong?
There's a little bit of cognitive dissonance going on here. A few posts ago you stated that sales really doesn't have much to do with quality. But now you seem to be discounting quality by pointing to market share. So high sales doesn't determine quality, but low marketshare determines lack of quality (or, not as much quality as other devices)? How does that work? Either sales means something, or they don't. You can't have it both ways. You can't say in one breath that having millions of sales doesn't speak to the quality of the device, and then in the same breath say the shrinking (which is also false) market share means Apple isn't doing anything right other then marketing their devices.
BTW, iPhone share isn't shrinking. It's remained steady for a very long time. I'm not going to get into why Android marketshare doesn't automatically mean Android is "better" because no one will agree regardless. What I will say though is, if you're combining tablet and smartphone share, iOS comes out on top, and quite easily. So by your argument, does that mean Apple is doing something right other then marketing their devices? If you disagree, you will have contradicted yourself. If you agree, you will have proven my point.
Sales doesn't necessarily equal quality, but its a good indicator that people enjoy the phone and think its a high quality device. You seem to have admitted that by bringing up market share.