Pakistan is not Somalia where you can go bombing willy nilly.
They used to say the same about the USSR.
No one will win.
It would take time for them to mobilise an aerial attack against Pakistan. By that time, you can say goodbye to most major US military assets within a 2100 mile radius that will be under the range of Pakistani bombers. Pakistan will shortly after, concentrate its Air Force in Central Pakistan and have a small chunk in the South to slow down US aerial operations.
Of Course, one of the first thing that happens to a country that is overwhelming being invaded is the collapse of their economy - but they can still carry out the fight for a long time before unconventional forces become norm.
US would definitely be stretched out by the war and could not be able to prevent other countries from giving support to Pakistan, except verbal condemnations and intimidating actions; there is little the US would be able to do. China would militarily support Pakistan covertly by sharing intelligence, supplying logistical aid, providing minor arms, deploying advisors, distracting the US through threatening maneuvers in the South China Sea. Iran would covertly send in fighters and supply logistic aid. Many countries including Russia would provide diplomatic support.
There are two major possibilities of Indian involvement:
1: India will be held back by a possibility of Chinese intervention. India never wants to be seen as an aggresor and will hesitate, especially in the face of friendly countries that will disapprove of any invasion; such as Russia. However, India will still keep the LOC hot. Incursions and skirmishes would also be very common.
2: India goes ahead with the invasion. Majority of Pakistani forces will still be placed defensively along the Indian border, as an enemy (USA) that is nearly 8000 miles away does not require too many personnel in the short-run. India does not have the capability to drag on a war for more than 10 days before hitting a logistic crisis, even with US logistical support; the best they would be able to do after one week is limited actions along the front line. Pakistani forces would be able to hold down this invasion force, with the loss of several thousand sm of territory. It would be similar to the Lahore Front during 1965, in which halved garrisons were able to halt entire Indian offensives through proper defensive procedures.
The question is IF USA was to go to war with Pakistan, is highly unlikely they agree and work together in many areas. Plus there is no stategic resources in PAK that US can not get elsewhere from weaker Arab countries. And unstable Pakistan is more dangerous then a stable Pakistan.
However the cat looks in the mirror and thinks his a lion. Similar situation. No offence we love Pakistan but to think it can fight the US is out of this world. Saying you will fight for your country and actually doing it is different, otherwise Afghans and Georgians would have defeated the Americans and Russians. The best PAK can do is organise an insurgancy campaign, which yes would work if US did decide to invade would be extremely costly. You also forget US is very good at finding political and ethnic differences in any country there are always sellouts, PAK is no different.
Covert help yes, Russia and China, would not go further then that. Iran, India and Afghanistan would welcome a weakened Pakistan. Saudi, Turkey, UAE would not be able to do much other then provide non state financial and military aid.
US assets would be secured well in advanced of the war, do you really think any PAK missiles will reach Israel, Iraq, Saudi without being knocked out. Do you think Saudi, UAE, Iran, Qatar etc would welcome PAK missiles over its airspace? Iraq had 100s of scuds they most got knocked out and were ineffective soon as the war started.
Further PAK has no air assets that can match the US, no radar tech that is immune which the US can not knock out or jam. Navy, would get destroyed pretty quickly. They would simply overwhelme PAK airforce with a couple of aircraft carriers and local bases.
Further they have proven assets against Chinese and Russian counter parts.
My point is majority of countries do not have the tech to counter the US in the air, navy or in the field of information.
I would happily support PAK against US or India, Iran and Afghanistan for the matter however it is unrealistic they would set PAK back 50 years without landing a single troop on PAK soil.
If they do the stupid thing of invading PAK then the insurgency would damage PAK people more then the US. But yes they can not successfully invade Pakistan, Iran, Turkey etc both the terrain and people would make it impossible. However they could set them back decades.
It's nice to love your country, but reality is outside a few large nations and the European tech gurus not many countries have the technology to counter the US.
As for the nuclear option, it would be a total disaster for Pakistan firstly then its neighbours. Not many countries can get away with using a nuke these days.
The problem with Pakistanis is they are too in love with China, Russia and Saudi which leads them to think they with help. This is politics, not friendship and countries do not just do each other favours especially when the big guns are involved.