Well I am not sure how much you follow Pakistan's cricket but in case you didn't realize, the problem is not with the bowling but with the batting hence my criticism was directed at the batsmen. I brought up Ajmal and Khan because both of these players have repeatedly talked about their aspirations and goals and how much they want to prove themselves at the highest level. I haven't heard Ali or Rehman express similar sentiments, but maybe they do without expressing them. which is fair enough.
The failure of Shafiq and Azhar Ali is simply a case of lack of hard work and dedication. I can say this positively because I have not seen any improvement or changes in their skill set since they started and I have seen them quite closely since they made their debuts, in the case of Shafiq earlier than that.
A cricketer at this level has to work constantly to upgrade their skill set or else you will be left behind..so many players who failed to upgrade were left out in the cold, Gautam Gambhir, Michael Slater, Morgan, Sehwag come to mind.
Both Shafiq and Ali had demonstrated some level of skill and temperament when they started which is why they made it this far but unfortunately, with their failure to work on their flaws and develop their game, the opposition has caught up with them. And if you are not working hard enough to develop your game, then your aspirations are not as high as an international athlete's should be.