Opinion:
1) Afghanistan is an important part of china belt and road overland component.
2) china signed several agreements with the Kabul government in the last 2 years
3) Pakistan is now a Chinese puppet
4) Afghanistan's islamic jihad spillover will be a problem for china, Pakistan and Russia.
5) it's not possible to stamp out the Talibans as they are pashtun and can easily escape over the Pakistani border if the usa is active.
6) leaving Afghanistan not only would save a lot of money but it would force china and Russia to make difficult decisions that might be in opposition from each other.
China seems more likely to try to buy the Taliban's cooperation, which is the easier and cheaper way, but that will affect china's image and could not work as it could lead to creating an environment for more extreme islamist group such as Al Qaeda (currently almost removed from Afghanistan as it was the main american target) and ISIS like groups.
Russia will need a stronger approach as they can't risk Afghanistan becoming a breeding ground for Cechen Islamic secessionist.
Overall leaving Afghanistan might cause loss of imagine but it saves a ton of money and causes a lot of issues to usa adversaries.