First, al-Qaida would definitely establish a broader base in Afghanistan very quickly. In addition, I do not know whether the Taliban could take over power in Kabul, because even if the west were to abandon Afghanistan, Iran and Russia would not abandon it. So there would be potential for another civil war.
However, there is no doubt that the impact on Pakistan would be very serious, because the Taliban and al-Qaida are now established in that country. They're not established just tribally, they are starting to extend their influence into administrative spheres, and thus, they could regain power. And since that would be seen as a victory in Afghanistan, it would be very difficult to manage for the Government of Pakistan.