Spanish Wikipedia has all the gen about Salamanca’s legendary magic academy in a cavern.
Once upon a time, Salamanca had a church of “San Cebrián,” which is an old spelling of “San Cipriano,” aka St. Cyprian. As chronicled on my blog, one of the early Christian saints named Cyprian (not the bishop, but another guy) was supposedly a wicked mage who mind-controlled beautiful young maidens into falling in love (or bed) with him. He finally met up with a beautiful and virtuous young Christian maiden named Justina, and she converted him. They both ended up becoming martyrs.
When the church was pulled down and deconsecrated, there was a hole left in the hill, where the sacristy used to be. It became the focus of student rumors and urban legends.
In 1464, Recueil des Histoires de Troyes reported that the University of Salamanca had actually been founded in ancient times by Hercules (who was associated in Greek mythology with Spain and Gibraltar, “the Straits of Hercules”). Hercules wanted all the liberal arts to be taught there, but for particularly diligent students, he brought in a magical statue that could answer any question. (A pretty standard variation on the medieval Brazen Heads that were associated in legend with university guys like St. Albert the Great.) A diligent Salamanca student could hope to find the talking statue hidden somewhere in town.
Hercules wasn’t villainous and the seven liberal arts were already being taught in Salamanca. So legend changed the founder to the Devil and the subject matter of his college to black magic of the most evil kind. Only a chosen few students were admitted to his doctoral program (seven, fifty, etc.), and only one would survive to be granted his degree.
And so, Salamanca gained a reputation in Spanish legend that was the opposite of its real purpose (training Catholic clergy and lawyers). De Vitoria probably lectured On Magic to cool off some of students’ prurient interest in the occult that may have developed from this legend.
The Marquis de Villena had managed to escape with knowledge but without a degree or giving allegiance to the devil, but he left behind his shadow. (This poet, humanist, and nobleman is mentioned by name in de Vitoria’s On Magic. Probably a shout-out to this student legend.)
Cervantes also wrote a one-act comedy play about it (La Cueva de Salamanca, 1610-1615), mocking people’s gullibility in believing the legend.
Francisco Botello de Moraes wrote La Historia de las cuevas de Salamanca in 1734, further elaborating the legend with a witchwoman, Madre Celestina, and a female goat-hooved demon named Mariálvara. I don’t know if it’s better described as a knightly romance with students and magic, or a proto-fantasy novel. But it’s pretty darned long.
But nothing seems to have scotched the rumors. In Spanish-speaking parts of the New World, a cave where witches meet is called a “Salamanca,” and magical native beliefs are also called “Salamanca.” Salamanders living in allegedly magical caves are “salamancas,” too.