Iran would smoke the Taliban in such a war and Russia, China, Hamas, Hezbollah, the Houthis, and the PMF would all intervene on behalf of Iran. Also, such a war would ensure the survival of the current Iranian government (which is still on relatively shaky grounds in terms of popular support, but not in any stage close to a Revolution until at least the day Ayatollah Khamenei passes) for another generation or two, as a war with Sunni extremists like the Taliban will rally even the most anti-regime Iranians to the side of the Iranian government.
I am pretty sure that the US, Israel, Saudi Arabia, and the Arab Gulf States would give support to the Taliban in this war as a way to weaken Iran as a state and push for Reza Pahlavi or the MEK to come to power in a fully cucked Iran.
I disagree with Israel supporting the Taliban. They know full well the Taliban would like to see them (and Jews everywhere), exterminated just as much as Iran would, so it's likely Israel would figure out a way to directly intervene to end the fighting and occupy both Iran and Afghanistan if it can.
If not, they'll likely take whichever path bleeds both sides dry for the longest period of time.