Indiana Jones and the Last Crusade. Indy mentions in class that there is no buried treasure and X "never marks the spot" Later in the film he discovers that the path to the Tablet is under the a number ten, which turns out to be the Roman numeral X, so X marks the spot.
The entire movie is an subversion of Indy's lecture at the beginning: there was buried treasure (the Grail, along with many, many other artifacts that any real-world archaeologist would deem significant); X did in fact mark the spot (as mentioned above); and archaeology did help Indy discover truth as well as fact (the scene where Indy is confronted by the Grail Knight and later reconciles with his father). Although Indy was right about one thing: most of the actual archaeology done in the movie was done in (or under) a library.
Variation occurs in Monty Python and the Holy Grail: at the beginning, a castle guard gets distracted by King Arthur's "coconut horse" and goes into great length talking about whether swallows could carry coconuts into England. Toward the end of the film, the Bridgekeeper asks, "What is the air-speed velocity of an unladen swallow?" Arthur remembers a detail discussed by the original guard and asks, "What do you mean? An African or European swallow?" which causes the Bridgekeeper to fall into his own trap. In the original ending, which was cut at the last minute, the English army was saved by sparrows dropping coconuts on the French.
Slumdog Millionaire uses a justified version of this trope to great effect. The entire plot is centered on the protagonist explaining episodes in his life that have given him unexpectedly useful knowledge.
In Shorts, Helvetica does her science projects on female wasps and their habit of "male-stuffing". Later on, in the fight against Giant Mecha Mr. Black, Helvetica uses the rainbow wishing rock to wish that she were a giant wasp... male-stuffing.
The Devils Backbone has a borderline example: in one scene, the boys are in class learning about prehistoric man, and Carmen shows them a picture of hunters taking down a mammoth as a group. The image is invoked at the end, when the boys bring down Jacinto by stabbing the crap out of him with sharpened sticks, before shoving him into the well for Santi.
Elwood Blues goes on one of these lectures to his brother in The Blues Brothers on the benefits of a cop car: cop shocks, engine, suspension, etc. This comes in handy with the utter vehicular chaos that ensues.
Starship Troopers has Sergeant Zim demonstrate the importance of combat knives despite it being a 'nuke fight', citing, "The enemy cannot push a button, if you disable his hand!" This comes in handy later when Carmen cuts off the Brain Bug's brain-sucking proboscis with a concealed combat knife. Interestingly enough, she wasn't actually at that lecture, being a fleet pilot, and all.
Worth noting, she was at the lab class where they disected bugs, causing her Vomit Indiscretion Shot. She seemed to get the hang of using a knife on bugs later on, didn't she?
An Anvilicious non-science version also happens with Raczak's high school lecture about the difference between a Civilian and a Citizen. Rico, Carmen and Dizzy are present for that scene early on, and just before the film's final act, the three are together again, where Rico talks about the difference between a Civilian and a Citizen while he and Carmen attend Dizzy's funeral. A Citizen is willing and prepared to sacrifice themself for the good of society, while a Civilian is not.
In Eclipse, Jacob's family tells a story about how a woman helped distract a vampire by cutting herself, which Bella does in the final battle. Also, Jasper warns everyone not to let a vampire grab you under any circumstances. Jacob forgets this and is nearly broken in half with a Bear Hug.
The first Jurassic Park sees paleontologist Dr Alan Grant scare a poor child with detailed information about the velociraptor pack mentality and how they tend to eat their prey.
In Copycat, Sigourney Weaver's character gives a lecture on serial killers and at one point asks all the men in the audience to stand. Several of the men's faces are then projected on the screen behind her as she explains that men are more likely to be serial killers, and how they look just like everybody else. Naturally, the movie's villain (a serial killer himself) is one of the men projected on the screen.
King Ralph could practically be the naming of this trope. At the end, when Ralph is looking for a way out, he tells an aide that he usually ignores what the aide says, that aide once said, 'I think we made the right choice'. Ralph remembers that and asks who the other candidate is, and the denouement begins.
In Mean Girls Cady uses this to win the Mathletes competition. She harks back to an old maths class to answer a question about limits.
Timeline begins with a history lesson the the archeologists. They go back in time and need to use exactly what they just learned.
Jett Jackson: The Movie, the made-for-TV movie of The Famous Jett Jackson: After Jett and his TV character Silverstone have switched places in each other's universes and have been living in each other's shoes for a while, Jett's grandmother later approaches Silverstone in a quiet moment, where it's revealed that she'd already figured out he wasn't her grandson. When Silverstone asks how she knew, she explains that when Jett was born, she looked him in the eyes and knew that from thenceforth she'd always be able to know and identify him. In the climax of the film, the shape-shifting Big Bad in Silverstone's world makes himself look like Jett, causing a doppleganger problem when the three confront one another; Jett and Silverstone look each other in the eye and know they're both the real deal.
Pirates of the Caribbean. In the first movie, Will frees Jack from prison using a bank as a lever on the prison door. In the third movie, when Jack is captured by Davie Jones, guess what he does to the prison door?
In the DVD extras of X-Men, the young mutants are learning about ancient Rome. Rome started out persecuting Christians, and then wound up becoming a Christian empire. How did this happen? "The Emperor became a Christian!" Which is exactly what Magneto had in mind with his plan to turn all the world leaders into mutants.