“The rabbis also were aware the Tanach predicted that Messiah would be both humiliated and exalted. They tried to resolve this apparent contradiction in three different ways.
The first possibility developed in the Talmud was that Messiah existed from before the creation of the world and came to earth when the Second Temple was destroyed. … This view eventually was abandoned …
A second explanation of the seemingly contradictory portrayals of Messiah as one both humiliated and exalted appears elsewhere in the Talmud: R. Alexandri said that R. Joshua bar Levi combined the two paradoxical passages; the one that says, ‘Behold, one like the Son of Man came with the clouds of heaven‘ (Dan. 7:13) [showing Messiah’s glory] and the other verse that says, ‘poor and riding upon a donkey’ (Zech. 9:9) [showing Messiah’s humility]. He explained it in this manner: If they are worthy, He will come ‘with the clouds of heaven;’ if they are unworthy He will come ‘poor and riding upon a donkey.’
A third solution is likewise found in the Babylonian Talmud. Here, the two different roles of Messiah are filfilled in two different Messiah. The first one is Messiah ben Joseph who fights, suffers extreme humiliation, and is pierced, fulfilling Zechariah’s prophecy … The second is Messiah ben David, who comes later and to whom God says: [here Frydland quotes Psalm 2:7].
The Messianic View
The rabbis failed to recognize one other possibility - that the Messiah was to atone for the sins of the people first and then return as the Exalted One to establish his kingdom. …
The rabbis strove to resolve the two distinct threads of prophecies in the Tanakh. As a man standing afar looking at two mountain peaks in direct line, they were unable to discern the ‘time gulf’ that existed between those peaks. With the hindsight of a ‘quarterback,’ and the additional revelation of the Brit Hadasha (New Covenant) the theory which best resolves the paradox is that one Messiah was to come in two different eras for two distinct purposes. …”
(Rachmiel Frydland, Ibid., pp. 7-8)