Rather than defeat anything during the so-called war on terror, the United States instead caused a proliferation of threats. Despite having lost, it decided to restart Cold War tension in Europe and Asia.
Under such circumstances, the possibilities available to undefeated terrorist groups are almost infinite. While it is a good thing that local forces may now be entrusted to defend their own interests against terrorists without Western intervention, international terrorist groups may quickly gain the ability to inflict disaster on the new Cold War belligerents while their backs are turned.
End of Days
We have no idea how groups such as ISIS and al-Qaeda view the developing Cold War between People's Republic of China and Russian Federation on one side, and the United States and European Union on the other. However, most likely, they view it as a chance for respite and an opportunity to plan new attacks.
By far the worst possibility is an apocalyptic one. Terrorist interlopers could infiltrate the battlegrounds of this new Cold War and stage operations aiming to draw the superpowers into destroying one another in a nuclear escalation, threatening everyone on the planet in the process. Terrorist groups like al-Qaeda are considered to be irrational actors in international relations, so they may believe this is a doable and beneficial operation for them. Even if they understand the consequences, ISIS or al-Qaeda leaders could decide they will bring about the end of days.
The Russian front
One policy that could present an opportunity for ISIS is the expansion of NATO across Eastern Europe, potentially up to the Russian border. This presents a region where militant anti-Russian sentiment in countries such as Ukraine results in a willingness to accept help from anyone, including potential international terrorists, in an effort to confront what they see as the Russian threat. They want to join NATO, but an anti-Russian ISIS or al-Qaeda fighter or a neo-Nazi is just as much of an attractive ally for them and they are delighted with them all.
Imagine a day of tension along a huge, thousand-mile frontier between NATO and the Moscow-led CSTO alliance. That is what the frontier would be like, if Ukraine joined NATO. Somewhere - anywhere - along that broad front, is an ISIS cell in possession of a small armed drone they put together in cooperation with anti-Russian fighters in Ukraine. Their intention, against the wishes of the Ukrainian government and NATO, is to attack the Russians with it, and provoke an incident. The Western side is too naïve to have imagined the scenario, and the Russians are too focused on the massive NATO threat to see the subsequent explosion as anything other than the opening of a NATO attack on the local Russian nuclear forces based in the area. Without any delay, the Russians launch tactical nuclear weapons at assigned targets inside NATO Ukraine, the Baltics and Poland, fearful that any delay may give the West a chance to neutralise these weapons. Every subsequent escalation would then be a loss to the West and East, and yet a victory for ISIS who secretly started it.
Avoiding the premature end of the world
The solution to the above scenario would be for NATO to step back from the Russian frontier, agreeing to a demilitarised zone (DMZ) of buffer states or regions between the two sides, since this would avert a situation of continuous tension and distrust along a thousand-mile frontline. To agree to such a DMZ, NATO would have to realise that a tense frontier simply takes power away from political leaders, decreases security for all, and possibly empowers third parties and low-ranking officers with the ability to start a war neither side wants. As well as giving ISIS or al-Qaeda the ability to start World War Three, a NATO-Russia frontline could even give solitary lunatics this ability if they shoot over the border between the two sides.
The delusion that one can simply abdicate from an existing war without winning it, and declare a different war, is extremely perilous. On the one hand, it suggests that Western politicians exaggerated the terrorist threat over a period of twenty years. Perhaps they don't really take it as seriously as they said they did, seeing it just fine to forget about it without even having accomplished anything nearly like a victory, but rather a defeat in Afghanistan. On the other hand, it may signal a false belief that a mortal enemy was defeated when it wasn't. A US decision to take the fight to Russia and China, when ISIS is still out there looking for opportunities to destroy both sides, may well be as idiotic as the West hypothetically deciding to focus all their resources against the Soviets before the Nazis had been defeated.
No cooperation on terror threats
Finally, even discounting the above scenarios as unrealistic, which they might be, the new Cold War potentially eliminates all possibilities of cooperation against international terrorism. The Russians and Chinese, and possibly the Turks (because the West is so much against them too) refusing to cooperate on terrorism could be fatal to the West. It could result in Europe being abruptly flooded with tens of thousands of armed militants keen to take the battle into Westerners' living rooms, high on victory in Afghanistan.