How come Turkey, Indonesia, Malaysia, the UAE have no issues with the US?? they are just as muslims as you are right? Food for thought: they don't have a terrorism problem and are democratic. People love to work with them and invest into their economies that grow every year!
If I were to reply to your excellent question, i would say, the countries you have mentioned did not have India and Afghanistan as their next door neighbors, lucky them.
Except Turkey, countries you have mentioned remained neutral during the cold war, and paid lots of attention to address their local issues, such as literacy rate, economics etc. Pakistan on the other hand could not keep itself from going into the US camp. Pakistan made this decision to make itself militarily stronger so she could resist India. The 1948 war of Kashmir instilled sort of insecurity in the psyche of Pakistani nation in general and ruling elite in particular.
We went into the US camp hoping (actually believing) that in an eventuality, US will rescue us. However, US never made any such commitments, hence when in 1965 the war broke between Pakistan and India, US imposed sanctions on both the countries. Pakistani rulers were aware of the actual terms and conditions but they misinformed Pakistani public, and put all the blame of their failure on the US. This was a turning point in bilateral relations between Pakistan and US, which went down the hill in coming years, and turned really sour after 1971 Dhaka fall fiasco.
Pakistani public had to know that US would have helped Pakistan only if Pakistan was under attack by a communist country, and not by India. During PM Bhutto's time, the relations remained cold, and did not restore until the Soviet invasion of Afghanistan.
I personally think that Pakistan was better off by not getting involved in Afghanistan, and i have several reasons in support of my thesis. First and foremost, Afghanistan was never on friendly terms with Pakistan. Secondly, she never recognized an international border on the Durand line between the two countries, and actively supported militancy in Pakistan (the Baloch uprisings etc). However, Pakistani rulers decided to get that conflict cashed and offered their services in return of US civil and military aid.
Things would have panned out well had we had not made a seminal mistake. Instead of restricting the millions of refugees to their camps, we allowed them to settle in Pakistan. We did not put in place any surveillance system to monitor the movement and activities of the refugees. This resulted in a flood of lawlessness, arms and drug trafficking, and mushrooming of tens of thousands of madrassas throughout the country. BTW, Pakistan was not the only country to host the refugees. Iran also hosted a very large number, but unlike Pakistan, she confined the refugees to their camps, and never allowed them to roam in the country, hence Iran was spared from the wrath of these uneducated savages.
USSR disintegrated and US left Afghanistan. We make lots of noise about this but forget that the prime (or perhaps the only) objective of US was to take revenge of its defeat in Vietnam from the USSR. US had no intentions of bringing peace and prosperity in Afghanistan for it was just not on her agenda. With fall of Kabul, Afghans resorted back to what they have always been good at, killing each other. Madrasas were churning out tens of thousands of fighters, who initially fought for several warlords, and later evolved into a standalone fighting Taliban force.
To sum up things, i would say, a Soviet- occupied Afghanistan was less of danger to Pakistan than a Taliban-ruled Afghanistan. Why we have issues with the US, i don't know for sure. Perhaps we had unrealistic expectations from US, perhaps our rulers lied to us on Pakistan US relations, or perhaps we have a very skewed and unrealistic concept of Muslim ummah.