Italy as a polity, regardless of how real the polity actually existed as a coherent and cohesive governing state, pretty much existed continuously from Rome until entirely left out by the Congress of Vienna in 1805 though. By the time 1848 rolled around most people alive were perfectly aware of the concept of Italy in living memory, and even those who didn't actually live in what was considered Italy - in particular those living in the south from Naples down to Calabria and Sicily, if they were educated and literate, were still aware of the notion of Italy as a distinct political entity. There might not have been much of a centralized government based in Italian territories that represented the polity for long periods of history, but ruling regimes/dynasties come and go but political entities tend to last longer.
You can even see this right now, where countries do not consider themselves to be as old as the current government's age, but much older. For example, most Italians will not consider Italy to be "started" at the Republic in '46, or even the Unification in 1861, but that the country is much, much older.