Ive heard that phrase for quite a while and have always wondered, did people from that time period really surprised by the spanish inquisition, or was it an event that was slowly gaining support over time?
Perhaps you already know the history of the meme, but just in case, let me explain it anyway. This usage of the phrase comes from a reoccurring Monty Python sketch. You can watch one of them here.
As you can see from the context, I think it's clear that when pressed on a subject, it was common for people in the 1970's Britain to quip, "I didn't expect some kind of Spanish Inquisition." The joke is not in the reality of the Spanish Inquisition being unexpected, but in taking a metaphorical colloquial phrase literally. For comparison, imagine a sketch where someone says "Wow, you're such a grammar Nazi," and then the person they're talking to rips off a disguise revealing a Nazi uniform underneath and says, "But hov did you no zat!!" The original phrase about the Spanish Inquisition has dropped out of popularity, or perhaps was never that popular in America to begin with, and so now the joke is more common than the thing it was making reference to.
Although the Monty Python sketch on which the meme is based on is absolutely hilarious, it's not exactly based on any sort of history.
Could people expect the Inquisition? Well, by the 15th and 16th century the Inquisition had existed in some way or other for three hundred years. In the third Lateran Council of 1179 the Pope was able to claim a number of powers, including to appoint bishops (previously the purview of local sovereigns or the horror local elections!) strengthen the requirements of clerical celibacy (weakening the hold of single european dynasties on ecclesiastical offices) and establishing the excommunication of those who did not adhere to the strict doctrine of the Catholic Church (heretics, in other words), laying down the precedent on which the Inquisition would be constructed. In 1184, a papal bull (titled "Ad abolendam") established that the Pope could accuse people of heresy without evidence, and encouraged bishops to investigate suspected heresy in the parishes they administered. By 1231, Pope Gregory IX established the office of "Inquisitorial Judge" with the responsibility of investigating the Bishops themselves, making sure they were carrying out their duties satisfactorily. Naturally, the accusation of heresy (leviable without proof) became an easy way for the Pope to intimidate incompetent or troublesome bishops through the Inquisitors. Although a guilty verdict could not be pronounced without "irrefutable evidence," the inquisition became a powerful tool by which the Papacy extracted power, and could be a useful to finish off controversial individuals. In 1318, for example, Pope John XXII, angry at the Lord of Milan, Matteo Visconti (for reasons which we don't have time to get into) got the bishops of Asti and Como (two cities in the Visconti domain) to accuse him of heresy (specifically, necromancy). Pope John couldn't get the Bishop of Milan on board though (the bishop was Matteo's son, Giovanni) but once the official accusation was processed John XXII took the liberty of extending it to two allies of Matteo's: Cangrande della Scala, Lord of Verona and Passerino Bonacolsi, Lord Of Mantua. The trial took place in 1320 in Avignon, but Matteo did not participate, citing his old age. Although Matteo could count on his successors and allies to fight the guilty verdict, many less powerful accused had no such luck.
In Spain, the Inquisition was uniquely constituted in 1478, specifically by King Ferdinand II of Aragon after lobbying the Pope intensely (Rome, in fact, seems to have been less than keen on the idea). Similarly as to how the Papacy used the Inquisition to exert control over its bishops, in Spain the "Catholic Monarchs" Isabel and Ferdinand used the inquisition to strengthen their authority over a peninsula rife with heresy. Perhaps as a reaction to increasing state control on religion, the Catholic Church established a centralized Inquisitorial Office in 1542.
So how "unexpected" were investigations conducted by the Inquisition? We have a very famous example: 1611, Roberto Bellarmino, a Cardinal and important scholar in Rome, began preliminary investigations with regards to Galileo Galilei's theories on a heliocentric solar system, which if proven true begin to discredit the worldview as envisioned in biblical scripture. An inquiry as to his "heretical" history was also made with the local inquisitor in Padua, where Galileo began studying the solar system. We don't know if Galileo was made aware of these initial investigations. However, the controversial nature of Galileo's work was well-known, and by 1614 an ambitious Dominical Preacher named Tommaso Caccini denounced several prominent scientists during a sermon in Florence's Santa Maria Novella church, including Galileo. Consequentially, it cannot have been a surprise for Galileo when the next year, Caccini deposited his accusations with regards to Galileo's heresy (specifically, that he held that the earth revolved around the sun, tied to an accusation that his theory was born out of Galileo's lack of faith). Further, the state apparatus of the Duchy of Tuscany, under whose patronage Galileo was given a research grant at the University of Pisa without having any classes scheduled (a dream scenario for many academics) was well aware of the Inquisition having opened up a dossier on Galileo; the Tuscan ambassador to Rome knew all about the proceedings, and it is safe to say Galileo, who was frequently demonstrating experiments at the Tuscan Court in the Pitti palace, was similarly well-informed.
So we can safely say Galileo was expecting the Inquisition. In fact, you could argue that Galileo was provoking the inquisition, personally arguing his case in Rome and staying three months to appeal the decision. He was, effectively, attempting to change the minds of the inquisitors, exasperating the Tuscan ambassador ("His humor is set on reasoning with the friars and fighting with them with which he can't but lose ... Staying away from this country would be of great benefit and service to him" wrote back the Ambassador). But Galileo didn't stop; and would provoke the church as well as scholars at the Roman College until he was summoned by the inquisition a second time, in 1633. Again, it can't have been too much of a surprise, he had spent years picking fights with Catholic Scholars: instead of limiting himself to writing down commentary on the appearance of three comets in 1618, he wrote a rebuttal to the published observations of a scholar at the Roman College. In 1624, after an audience with newly elected Pope Urban VIII, Galileo petitioned him to accept the heliocentric model of the solar system. After the Pope said no, Gelileo published a lengthy treatise on the solar system anyway. Although only published in 1630 due to complications tied to his health the Church insisted on his presence, and in 1633 he was summoned before the Inquisition again. Now, his book had already been banned in 1632, meaning that Gelileo Galilei could have been reasonably expected to be expecting the Inquisition.
There used to be a quite in depth thread on this which I can't find, but this one provides a quick answer to get you started