From Chapter Fourteen of Rabbi Shloma Majeski’s Likkutei Mekoros, Volume 2. (Underlined text is the compiler’s emphasis.)
Translated by Boruch Merkur
It is written in Zohar (Shmos 8b): “At the end of twelve months, a ruler will rise up from the Jewish people – this refers to Malka Meshicha, who will awaken from within Gan Eden.” This statement, however, is highly perplexing as it suggests the radical position that Moshiach will not be born of man and woman; he will simply emerge from Gan Eden at that time. Yet it is written, “I have begotten you today.”
In my humble opinion, it is certain that Moshiach will be a righteous person born of man and woman, who will grow in righteousness until the appointed time when the redemption will unfold (keitz ha’yamin). Through his deeds he will merit a holy soul – Nefesh, Ruach, and Neshama. Then, on the day of the keitz, a Neshama will come to the Neshama [of Moshiach] situated in Gan Eden, and it will be granted to the righteous man [as he exists in the physical world]. He will then merit to be the righteous redeemer [and usher in the Messianic Era].
This process is reminiscent of how Moshe Rabbeinu, alav ha’shalom, who was born of a woman, grew and developed spiritually little by little. There, at the [burning] bush, the process was complete, through the esoteric principle of “An angel of G-d appeared to him b’labas eish (in a flame of fire) from amidst the thorn bush, etc.” It is understood among kabbalists that the three letters of “labas” – Beis-Lamed [from “labas,” which is spelled Lamed-Beis-Tav] from the name “Hevel” [spelled Hei-Veis-Lamed] and Tav from the name “Sheis” [spelled Shin-Tav] – were completed at that time. Then Moshe merited to be the redeemer.
With this background, we will understand how the verse, “I have begotten you today,” refers to [the transference of] an aspect of a Neshama to a Neshama [i.e., how the soul of Moshiach is illuminated from Gan Eden with extra G-dliness] and how then, on that day, the Neshama [of Moshiach] shall emerge from Gan Eden. An accurate read of the Zohar requires this interpretation [that “begotten” refers to a spiritual birth or conception], for it says that he will “awaken” in the land of Galil – as though he were formerly sleeping. And when the Neshama comes to the Neshama [illuminating the aspect of Moshiach’s soul that resides in Gan Eden and thereby] adding to Moshiach the power of prophecy, he will then awaken from his “sleep.” This elucidation shall suffice.
It is already known that forty days corresponds to the period of forty days prior to the formation of a viable fetus [i.e., conception, when the fate of the unborn child is determined ––Sota 2a]. Thus, the heavenly pillar [associated with Moshiach (see the Zohar quoted below)] lasts for forty days, akin to the forty days of Moshe Rabbeinu, alav ha’shalom. During this time, the Neshama of Moshiach remains concealed there [in Gan Eden]. After forty days, though, Moshiach will merit that Neshama and it will be revealed within him. He will then recognize in himself that he is Moshiach, something that eludes him until then.
Thus, it states in Zohar that “after forty days, amuda yakim (a pillar will stand up or rise),” meaning “it will ascend (yistalek)” and Moshiach will be revealed. That is, prior to that point he was not recognized [as Moshiach], but at that point he will be revealed. […]
Similarly we find with regard to Moshe Rabbeinu, alav ha’shalom, who rose to the heavens body and soul. Moshe remained there for forty days to pave the way for another Moshiach, so that he should merit that Neshama and recognize in himself that he is Moshiach.
Thus, it is said, “Moshiach will be revealed, but other men will still not recognize him [as such].” Then, for a year, Moshiach will be concealed body and soul within that pillar, reminiscent of how “Moshe entered within the pillar of cloud.” He will then be taken up to the heavens. Afterwards, Moshiach will finally be fully revealed and only then will he be recognized by others as Moshiach.
(Rabbi Chaim Vital’s Shaar HaGilgulim Ch. 13, pg. 31)