How come Rashi, Rambam, and other great Rabbanim never wrote anything on the mystical aspects of the Torah (as far as I know, I could be wrong). Rashi is universally regarded as the greatest commentator in Jewish history, so it seems odd that he never commented on the hidden aspects of Torah as well. Furthermore, there are some great Jewish commentators who even said that Rambam was not aware or learned in the inner aspects. What are we to make of all this? What are we supposed to learn from this?
We do find kabbalistic teachings in the writings of some of the great medieval rabbis like the Ramban, Rabbenu B’chaye, Sefer HaRoke’ach, the Abravanel and others. Nevertheless, regarding those whose writings don’t relate to kabbala: a. The mishna (Chagiga 11b), directs us not to teach the deeper messages of creation and the ways of G-d, to the masses, for they can be easily be misunderstood. This was the traditional custom (Rambam Y’sodei HaTora 4, 10), as opposed to the current trend where many teach kabbala and chassidut to the masses and even to beginners, based upon a special leniency necessitated to combat assimilation in any way possible. Accordingly, many rabbis didn't wish to publicize these ideas by writing and publishing them to the general public. b. It’s logical that such “secrets” didn’t reach every area in every time period.