There is much that is wise and auspicious in the Prophet Jesus (as) and Hazrat Mahdi (as) not being recognized, despite all the manifest portents. The great Islamic scholar Bediuzzaman Said Nursi has described how the personages of the End Times will not be recognized by everyone, and how there is great wisdom behind this:

Since belief and accountability are a test, a trial, a competition within the bounds of man’s will, matters that are obscure, profound, and in need of careful study and experiment cannot be obvious. They should not be so compelling that everyone has to affirm them willy-nilly. For in this way the Abu Bakr’s may rise to the highest of the high and the Abu Jahl’s descend to the lowest of the low. If there is no will, there is no accountability. It is because of this mystery and wisdom that miracles are displayed only rarely, and in this realm of accountability, like some allegorical verses of the Qur’an, the signs of the end of the world, which will be visible and seen, are obscure and open to interpretation. ... In fact, although when the Prophet Jesus (as) comes he himself will know he is the Prophet Jesus (as), not everyone will know. Similarly, fearsome figures such as the antichrist and Sufyan will not know themselves to be such. (Bediuzzaman Said Nursi, Rays, p. 579)

As stated by Bediuzzaman, one of the wise aspects in the personages of the End Times not being recognized is the fact that this state of affairs is a test. Allah has created this world as a place of testing and all people are tested throughout the course of their lives. In the same way that people living in the period when the portents of the Day of Judgment begin to manifest themselves, when the Prophet Jesus (as) returns to Earth and when Hazrat Mahdi (as) appears, will be tested by everything that befalls them, so they will also be tested through their reactions and attitudes when these holy individuals appear.

Another wise aspect of this situation, in addition to it being a requirement of testing, may be that in this way the Prophet Jesus (as) and Hazrat Mahdi (as) can remain free from pressure from unbelievers. These holy individuals’ not being recognized when they first appear may be a manifestation of our Lord’s protection of and support for them. (Allah knows the truth.) As has already been made clear, the time when the Prophet Jesus (as) and Hazrat Mahdi (as) appear will be a very harsh one, when moral degeneration reaches very serious dimensions, when unbelievers harbor a fierce hostility towards religious moral values and the faithful, and when they wage intense overt and covert activities against them. The Prophet Jesus (as) and Hazrat Mahdi (as) remaining concealed and unknown at such a time will be a means whereby they are protected from onslaughts by unbelievers. (Allah knows the truth.)

It will be a period when these two holy figures wage a great intellectual struggle against irreligious and pagan systems and when they are actively spreading religious moral values across the face of the Earth. Their not being recognized by the majority of people will also make things much easier for them in the early years of their activities and will accelerate people’s acceptance of Islamic moral values. (And Allah knows the truth.)