There was nothing more anachronistic in Europe than the perverse obstinacy of the Catholic Church in refusing to renounce their temporal power and at the same time refusing to reform the government: even Metternich by mid 1830s was pretty upset with the miopic and retrograde administration who mismanaged and antagonised each and every province they were governing. The brief hope of an internal reform of the church died in 1848, and when Pius IX was reinstated in 1849 by French bayonets he became remarkable by the repressive policies he ordered and by how much his executioners were kept busy.
By 1860 the rump Papal States (reduced to Latium) were a dead man walking and one of the most significant mistakes of Louis Napoleon was to support them for internal reasons, jeopardising the Italian goodwill earned during the war of 1859. The question was just how long they would last, and French defeat at Sedan sealed their fate. Austria never even blinked, and certainly never offered Pius IX a safe haven (even a half-heated attempt by the pope to reconvene Vatican I in Trento got a very cold shoulder) and the internal situation of Spain was such as to discourage any idea of going into the exile there.