Most European countries are unitary states or ones like Spain where levels of autonomy depend on the area. As an American, I understand this makes me biased, federations seem to me to be a good solution to culturally and linguistically different areas operating under a single unit. So how come areas with such linguistic diversity like France, Spain, and Italy never had pushes to become federations? Why did Germany federate when Italy didn’t? Why is Austria of all places a federation?
I don't know what are the particularities of the Italian, Austrian or French cases, but I can shed some light on the Spanish case in a very summarized way.
In the first instance, the creation of the Spanish nation-state has traditionally its bases in the dynastic union originated with the marriage between Isabel of Castile and Fernando II of Aragon in 1469. Isabel was the queen of the Crown of Castile; which included the kingdoms of Castile, León, Murcia, Galicia, Seville and Córdoba, the principality of Asturias and the dominion of Vizcaya. For its part, the Crown of Aragon was made up of the kingdoms of Aragon, Valencia, Mallorca, the principality of Catalonia and various territories in southern Italy. The various territories governed by both monarchs were, in technical terms, independent territories under a legal and administrative framework that experts call the polysynodial model, through which they shared the same monarch, but had their own laws, institutions, currency and, to a certain extent, its own foreign policy. This was most evident in the Crown of Aragon, which had been gestated as a practically confederal model since its origin in 1162.
In 1514, the personal union of multiple sovereignties cimented itself: the Crown of Castile and its American viceroyalties, the different territories of the Crown of Aragon and many others fall on the head of Emperor Carlos V, grandson of Isabel and Fernando, thus definitively configuring the Hispanic Monarchy. During the next two centuries the "tug of war" between the house of Austria and the various territories controlled by them was constant, given the clear idea that the monarchs intended to pave the way towards administrative homogenization, thereby seeking to establish a centralized state model. However, the enormous extension of the empire, especially during the reigns of Felipe II and Felipe III, made a policy of assimilation of the Aragonese and Portuguese territories unfeasible (remember that Felipe II would also be king of Portugal from 1580 through the Iberian Union). During the reign of Felipe IV, the Hispanic Monarchy was on the verge of breaking down due to the uprisings of the 1640s in Portugal, Catalonia, Andalusia and Aragon against new centralist policies by the favourite of the king, Gaspar de Guzmán.
At the beginning of the 18th century, the Bourbon dynasty replaced the house of Habsburg reigning of the territories of the Hispanic Monarchy and violently annexed different sovereignties from the Crown of Aragon to the Crown of Castile and the first disappeared through the decrees of Nueva Planta. The reasons are diverse: In the first place, Castile was where the capital of the "empire" was located since 1561 and where a more favorable evolution had taken place with regard to the imbalance of power between the monarchy and the nobility in favor of the first. The Spanish kings in fact identified themselves with Castile, the richest territory among their possessions as it was from where the American trade was managed due to its orientation towards the Atlantic. In addition, the territories of the Crown of Aragon had positioned themselves against the Bourbon side during the war of Spanish succession, so the elimination of their privileges (and languages) can also be understood as a kind of punishment by Felipe V.
The Spain of Felipe V then corresponds de facto with the current concept of political-administrative unit of Castilian base that we call Spain. The process of unification of their political, administrative, judicial, educational, police, territorial and monetary structures continued with their descendants and was especially relevant during the reigns of Carlos III (1759-1788) and Isabel II (1833-1868), as well as under the brief reign of Amadeo I of the House of Savoy, the first owner of the title of "King of Spain" in 1870. These are the years of the rise of nationalism in Europe, and Spain was not different in that regard. By then Spain had lost a good part of its colonial empire and peripheral nationalisms (Catalan and Basque especially) posed a threat to the unity of Spain, a state that was identified with Castile. It is therefore not surprising that the main federalist positions emerged in Catalonia, the main economic engine and the only industrialized region of Spain next to the Basque Country.
After a brief and eventful first federal republic (1873-1874) that only came into existence in a circumstantial way as a response to the abdication of Amadeo I, the Bourbon dynasty was restored again in the figure of Alfonso XII. His son Alfonso XIII would reign during the immediate years of the crisis of 98: the loss of Cuba would have a very profound impact on Spanish society, and would open the way together with the Annual disaster (1921) to the dictatorship of Miguel Primo de Rivera (1923-1930) with the king's approval. Primo de Rivera would end up dissolving the Mancomunitat de Catalunya in 1925 (an institution that unified the catalan provinces), and would impose the traditional idea of Spanish nationalism linked to equating the idea of Spain to Castile, Catholicism, the Castilian language and the monarchy as elements that held the nation together.
With the end of the dictatorship and the elections of 1931, which ended with the abdication of the king and the establishment of the second republic, the federalist and progressive ideals of the peripheral regions (Catalonia, the Basque Country, Galicia...) gained strenght again, approving the autonomy of Catalonia in 1932 and already, during the civil war, that of the Basque Country (1936). All be said, one of the reasons for the outbreak of the civil war is, again, the fear that the autonomy of the most diverse territories could lead to the breakdown of Spain. For this reason, once Franco came to power, he ended Catalan autonomy and prohibited the use of all languages other than castilian, a practice that had been carried out on several occasions since the 18th century. With the death of the dictator and reaching the Transition, an intermediate model was chosen that would satisfy both the sectors that came from the dictatorship itself and were in power, as well as with the anti-Francoist social and political demands that had gained strength since the 1960s. For this reason, the autonomy model was chosen, by means of which certain competences were granted to the various territories, all despite the fact that it was not a full federalism.
In summary, the inheritance of Castilian centralism in Spain, imposed by the Bourbon dynasty and embraced by two dictatorships, is still very present in Spain due to the fear imposed by Spanish nationalism that federalism could "destroy Spain". In the same way, the idea of a federal state is linked especially to the idea of a republican Spain, while Spain is a parliamentary monarchy by inheritance from the dictator Franco.
That being said, this question is much more complex and detailed, and if we start to talk about specific cases (especially in relation to Navarra and the Basque Country, quite special territories in relation to their own political and economic regime due to certain concessions historical) we could spend hours and hours writing. With this, it must be understood that the idea of the Spanish nation-state is linked to Madrid and Castile, considering the peripheral territories as spaces that must be assimilated (something that is even marked on many maps of the time, such as this one from 1854).