You're watching a proxy war between Iran and their Shiite allies (Assad in Syria, Hezbollah, to a large degree Iraq's government) and the Gulf Cooperation Council countries (Sunni countries including Saudi Arabia, Qatar, U.A.E, etc). ISIS doesn't just support a large, expensive war by itself, they have massive support from around the Gulf. What happens when support wanes is what is happening with the Free Syrian Army, which just had a bunch of top commanders for "lack of support". This will continue on as long as the money, weapons, and training keeps flowing.
Granted the Iraqi government did bring this upon themselves to a large degree by politically oppressing the Sunni population, if the Sunnis want a civil war, they will loose. We saw this script in 2006, and it involved Shiite death squads wholesale slaughtering Sunni civilians. It's not pretty, and now there aren't US troops to hold them back. Meanwhile the bloodbath continues in Syria with no end in sight. Assad has too much support to be broken at the moment.
As much as the Shiite groups in the Middle East are far from our friends, at least they're not supporting Jihadis around the region. We need to pressure the Gulf states to stop supporting the ISIS, which who knows it will be effective or not. The capture of weapons and money in Mosul were a huge shot in the arm for ISIS on both sides of the Syria/Iraq border, so it might not matter right now what happens in the short term.