Sort of used in Persona 3: a teacher obsessed with magic explains the significance of the major arcana of the tarot about halfway through the game. This becomes at least marginally important when the Final Boss states that Death, the 13th arcana, represents the end. However, as the teacher explained way back when, Death is merely a change, not the end, and there are another 8 major arcana after Death, which allows the protagonist to use the true final arcana, The World, to defeat the Big Bad.
Used in a similar manner in Persona 4, by the same teacher no less. While on a trip to the high school from Persona 3, he tells you the story of Izanagi and Izanami. Which explains the motivation behind the final boss and how you beat her in the end.
Kingdom Hearts: 358/2 Days has a kernel of wisdom, courtesy of Xaldin—he warns that the bridge to the Beast's Castle is the only point of access, so if a powerful enemy were to attack the area it'd come from there. Both foreshadows the appearance of such a boss later in the same game, and is a Call Forward to Kingdom Hearts II where Xaldin engages you on the bridge.
In Birth By Sleep Eraqus tells Aqua classified information only Keyblade Masters are allowed to know, but this knowledge isn't revealed to the player until the Final Episode where a flashback reveals Eraqus told her how to protect the Land of Departure by turning it into Castle Oblivion.
It gets glossed over early on in Soul Reaver that vampires are vulnerable to certain sound frequencies, but this doesn't serve much purpose except for a sound-based attack spell and a non-canonical deleted ending. Then three games later Defiance pits us against Turel, a vampire with Super Senses who can only be harmed by ringing a series of giant gongs.
In the first year of Grim Fandango, the janitor demon lectures you that spraying the fire extinguisher on the packing foam causes an explosion. You use this information later on in the fourth year, where you use it to build a rocket to save Glottis.
Used in Half-Life 2: Episode 2: At White Forest, a rebel is teaching others about the effectiveness of an AR2 Combine ball against hunters, a while before the White Forest rocket is attacked by hunters and striders.
In Space Quest V you begin the game by passing a test that gives ridiculous answers to questions like "how to best defeat an android bounty hunter" — "drop a rock on him". Several of those turn out to be answers to in-game puzzles.
In Dangan Ronpa: The Academy of Hope and the High School Students of Despair, several days end with Monokuma holding a short "Monokuma Theatre" segment. While these can sound quite random (especially as he enjoys reminding everyone that he's a bear), sometimes they foreshadow future events.
Not a lecture, but there's a wooden educational toy in the classroom from Riven that reveals how the D'ni number system works. Playing with it allows you to solve other puzzles elsewhere in the game.
World of Warcraft: In the Valley of the Four Winds, there's a pandaren martial arts trainer who will teach the player barehanded fighting skills. The training involving breaking bamboo, wood, and eventually stone with their hands, which comes in handy during the following storyline that ends in you punching a giant kunchong to death from the inside.
Mega Man Battle Network 3, Lan learns about data compression in a class at the beginning of the Bubble Man's chapter, when the boss shows up, it turns out you need a data compression program to shrink down Mega Man to walk across a narrow bridge.
A common occurrence in Zero Escape. Characters will sometimes lecture you about something you ran into and will be involved in something more important in the future.