In Bilaam's brachos of the Jewish people, he relays a message that was intended just for us, sitting on the threshold of the end of days. In perek כד passuk יז Hashem's plan is revealed in the statement דרך כוכב מיעקב וקם שבט מישראל - A star will shoot out from Yakov, and a ruler will arise from Yisrael. The Or Hachaim explains that this double description of Moshiach, either as a star or as a ruler, describe the two possible ways Moshiach can arrive. He can arrive like a star, in a miraculous manner, or like a regular ruler, rising naturally. He explains further that this depends on the state of the Jewish people. If they are meritorious, and the redemption comes in the time of אחישנה - the hastened time - then Moshiach will be like a star. Otherwise, Moshiach will come in a natural manner, in the time of בעתה, or the preordained time. This second choice is what Zechariah describes when he talks of Moshiach coming עני ורוכב על חמור - a pauper riding in on a donkey.
On this concept, Rav Shimon Kessin explains that Moshiach ben Yosef, who we are speaking of here, is a direct reflection of the Jewish people as a whole. The reason for this is very deep, but on the surface level, let us just say that Moshiach has agreed to a 'deal' with Hashem that however low the Jewish people have fallen, he will enter into the darkness that they have created, and suffer there with them in order to balance out the judgment and give them a chance to repent. This does not mean that Moshiach is punished for the sins of the Jewish people, Heaven forbid, but rather, that he takes upon himself to suffer on their behalf, and thereby open the door for them to repent before their final judgment is brought down upon them.
The result of this is that Moshiach ben Yosef literally reflects the spiritual state of the Jewish people. If the Jewish people are righteous, then Moshiach comes in 'like a star,' looking like the great righteous individual he is. If the Jewish people are on a low spiritual level, however, then Moshiach appears to be someone on a low spiritual level as well! Thus, if we had to guess who Moshiach ben Yosef is today, he is definitely not someone who would appear to be a great tzaddik! This concept is somewhat counter-intuitive, but there is a deep explanation as to why this is so.
One of the interesting results of this is that for thousands of years, the nations of the world - the descendants of Esav and Yishmael - have believed that they have replaced the Jewish people. They back this claim by saying that it is clear that they are the correct ones because they are the ones who are ascendent in the world - they have the תפארת and עז - the spiritual beauty and physical strength. They would claim that the Jewish people have been rejected by Hashem and that is why we are in such a lowly state.
When Moshiach finally reveals himself, they will see that he is not exactly what they had expected - he is not someone who seems to be a paragon of righteousness, rather his piety will be covered with layers of darkness and externalities, just like the Jewish people he represents. When they see such a person and it becomes absolutely clear that he is indeed Hashem's chosen Moshiach, it will be clear that those who had seemed righteous and dignified all along - the nations of the world - were not true representatives of Hashem's plan, but rather it was the trampled nation of the Jews, who seemed so lowly, who truly were the beacons of Hashem's light. This, says Rav Kessin, is the explanation of what is going on in the psukim in Yeshaya (end of perek 52 through perek 53) which is speaking both about the Jewish people and Moshiach ben Yosef himself, as both will look in the time right before Moshiach, and how the nations will react to his revelation.