For over half a century, Pakistan has considered itself a mighty power, or at least a mighty Moslem power. That never really happened, although by possessing nuclear weapons, many Pakistanis now believe their country is a big deal militarily. But Pakistan is obviously, even to many Pakistanis, overshadowed by neighboring India. Moreover, while India has become more economically and militarily powerful, Pakistan's trajectory has been downward. This is something most Pakistanis and Moslems in general, don't want to accept. It's an old problem, and it explains a lot of the hatred Islamic radicals direct towards peaceful, and quite tolerant (towards Moslems) India.
When British India was partitioned in 1947, most of the Moslem population ended up in the newly created Pakistan (meaning "land of the pure.") For Moslems, this was something of a triumph. Finally, there was a mighty Moslem state in South Asia. For Islamic people, India was always something of a challenge. Despite several invasions by Moslem conquerors, the Indian Hindu population was very resistant to Islam. Never more than a third of the Indian (India and Pakistan) population could be converted. For Islamic radicals, India, along with Spain (which also resisted Moslem conquerors) is lost Islamic territory that must be reconquered. India, then and now, does not want to be conquered by Moslems.
Another historical problem is that no Moslem monarch was able to actually conquer all of India. Britain was the first to actually exercise control over all of India (including Pakistan and Sri Lanka). But even the British did not rule all of India directly. For Britain, India was more of a business than a political undertaking. Thus British rule was more federal and cooperative. Local rulers retained a lot of power, as long as they cooperated with the British.
When India and Pakistan were created in 1947, Pakistan immediately found itself with several big disadvantages, some of them self-inflicted. First, Pakistan was split into two widely separated parts. What is now Pakistan was West Pakistan back in 1947. What is now Bangladesh was East Pakistan. The two Pakistan's were quite different culturally and politically. It was West Pakistan that was most hostile to India and Hindus. These differences between the two parts of Pakistan led to a civil war in the early 1970s. The result was a bloody split, leaving present day Pakistan and Bangladesh.
Another problem with Pakistan was the presence of large tribal minorities (the Pushtuns along the western border with Afghanistan and in the north, and the Baluchi, in the southwest.) The Pushtuns, in particular, were a big problem and had been for thousands of years. Pakistan also had religious problems, with mainline (Sunni) Islamic conservatives terrorizing other Moslems and non-Moslems. Tribal and religious animosities were much less of a problem in Bangladesh.
Finally, Pakistan has some serious social and political problems. Unlike India, which broke up the holdings of the large land owning families, Pakistan did not. As a result, democracy in India was not crippled by feudal families and their arbitrary exercise of power. Pakistan ended up with more illiterates and more periods of military government. Both India and Pakistan inherited lots of corrupt practices, but India did more to deal with the corruption, and foster economic growth.
In reality, victory for Pakistan would be just keeping up with India in education (literacy and college grads) and economic growth. Instead, Pakistan has a very expensive (compared to India) army that has never won a war (and lost four to India) and government (be it elected or a military junta) that can't govern. Worse, the Pakistani army justifies that disproportionate chunk of the national income it takes by defending the country from Indian invasion that will never come. India has never been interested in conquering Pakistan, and has become even less concerned about their chaotic neighbor in the last decade. As something of an ultimate insult, India now considers Pakistan a minor problem, and is more concerned about China and leftist rebels and tribal separatists within its own borders.