It was certainly not India that unleashed terrorism on Pakistan, to begin with. Rather, it is Pakistan that has been fighting with its military and terror organizations to succumb India. When India started to resist with its larger military Pakistan started to enlarge its military and purchase weapons from the foreign countries.
This caused it to fail in the development of the country. Military people usually do not produce anything, but they take away a big chunk of national money as salaries, amenities, and privileges.
The USA used Pakistan and Taleban to get rid of the Kabul govt sponsored by the USSR. Now, it has dumped both and installed a govt of its choice in Kabul that it believes serves the long-term interest of the region. But, you are still sponsoring Taleban with money and weapons to fight against Kabul. Now, you are getting back what you have thrown at these two countries.
It is Pakistan which is supporting the hawkish Islamic elements to project its might. But, in the process, it is being similarly treated by its two neighbors. Why do you complain? Today or tomorrow Pakistan will have to face the reality of becoming an overpopulated poor country.
The best way to avoid it is to downsize your military establishment and keep peace with your two neighbors with the brokerage of big powers and start rebuilding your economy.