The Mahdi hadith are exaugurated by both Sunnis and Shia sects.
The Mahdi is the most repeated warning in Quran (more then the day of judgment). The fact you haven't payed attention to how the Quran talks about the Mahdi, with all the conditional prophecies, and situations he can find himself in relating to the phases of the Prophet's (s) life, is not God's faults you don't see.
You don't fight to break the sorcery and see with mental clarity what most of the Quran is about.
His mission is the hardest of all tasks, but despite what Shiites say, it's not a guaranteed success. Yes, justice will be served, but justice can be the situation in Chapter Yaseen, one believer, rest perish.
Yes, the righteous will rule the earth, but on what terms?
All cities and civilizations can be destroyed for all we know, this is one of the conditional prophecies possible in the Quran.
Also, if believers gain victory, and we win, it's also possible most of humanity enters the religion due to that.
What is for sure, if we do nothing, it's as God says "if you don't do it, there will be great fitna and much corruption/havoc in the land".
There is two ways of waiting. Disbelievers always anticipate mockingly, "let it happen, it will never happen, we will reject God's Signs and Messengers and nothing will happen - but go ahead bring it if you are truthful" which is a condition they won't believe no matter what or until they are destroyed and it's too late.
The believers wait wanting victory but as far as the punishment goes, when the Mahdi (a) comes out, they will fear it because the believers are caring people despite all the hate they get from others, they are afraid of their people and cities being destroyed. So when the hour comes in this sense, the believers greatly fear it while the disbelievers will mockingly hasten it, as did many perished people did.
If we can convince humans to take the Mahdi (a) seriously, accept miracles, and not accuse him of sorcery or alien tech or being a tool of demons with great powers or possessed and controlled by them, then they will be spared.
God doesn't even put the terms humans have to believe when miracles shown. All he wants in them to fear enough:
(1) To give the Messenger a chance to explain himself and convince them he is God's representative and explain why miracles are proofs.
(2) To not prosecute believers and stop oppressing them.
In fact, if 2 is done, God would not destroy.
When God tries people with harm, we got to convince people, to repent and accept it. But with all the damn movies, and shows, about people with top power, I already see it, they gonna paint the Mahdi (a) as a great sorcerer or with great technology that must be defeated. It's already hinted in so many movies and shows, that this is the stance, people are incepted with.
We have to convince people even now, despite them not being in the open, that miracles are proofs, and even distinguish between miracles and what can be work of magic or technology.