In the future, G-d will make everyone remember everything ever learned, even if it was forgotten during one’s lifetime (Zohar I: 185a). This is also true of lessons heard from the lips of a true tzaddik and not understood. In the World to Come, they will be understood (Tzaddik #388).
The Torah exists mainly for the soul. In the future life, all souls will remember and understand everything they heard and studied in this world.
Fortunate is he who fills his days with much Torah and devotion.
Rebbe Nacham, Sichot HaRan #26