If there has been no past established "canon" about Spain, may I propose my own take on how Spain would develop in the wake of a German victory.
Spain had ridden out the Great War as a neutral nation in a world of war, but, even as she stayed aloof of the destruction of the war directly, she did not emerge from the flames unharmed. German U-Boat campaigns had severely damaged Spanish naval trade throughout the war, though the domestic economy had begun to increase as many sought armaments from neutral nations, even allowing for the notoriously debt ridden Spanish government to make great headway in climbing back from bankruptcy. More critical, however, was the effects of the war on the home front. Though industry had begun rapidly expanding during the war, the influx of armament trade produced rapid inflation, and the aforementioned U-Boat campaigns led to a near total stop of imports, only contributing to the price of goods soaring.
Domestic conflicts stirred as political parties divided themselves among pro-German and pro-Entente lines, food riots erupted, soldiers started unionizing, and general strikes were threatened. Governments collapsed and the home front was taking devastating blow after blow, and that was before the Spanish Flu tore through the nation like a storm. By the time that peace had erupted between Germany and the Entente, Spain was a nation that desperately needed respite. Unfortunately, that respite would not come.
As German victory was announced in Europe, Spain instead turned its attention to their African holdings, more specifically, Northern Morocco, otherwise known as the Rif. A previously "minor" rebellion, as minor as they got in Morocco at least, turned devastating with the surprise "Disaster of Annual of 1920" where over 13,000 Spanish men of a force numbering 20,000 were killed or lost, scattered by a far numerically inferior force led by Abd el-Krim. With rapid pace, el-Krim's newly declared "Confederal Republic of the Tribes of the Rif" rapidly reclaimed the Rif from Spanish forces, within the year they had pushed the Spanish out of all the territory they had conquered in 1909, and the Germans, always interested in Morocco, took notice. Rifian forces wielding German arms, supplies, training, and sometimes officers and troops, surged forth against Spain, and in late September 1921, el-Krim, given assurances of German support, would assault the city of Melilla, the last major city underneath the Spanish control in the East. 36,000 Spanish soldiers underneath the command of General José Sanjurjo fought against the Rifian tide, and 36,000 Spanish soldiers would not return to Spain, having been killed, lost in action, or captured as the city fell.
In Spain, the domestic conflict only worsened, as the nation became torn between Africanists (who favored the continued war in Morocco) and abandonistas (who favored abandoning the seemingly pointless bloodshed). Rapidly, the internal situation worsened, before His Majesty's Government, fearing civil war should nothing be done, declared an expedition of 200,000 men to the Rif "to make quick work of the rebellion," in vain hopes of achieving support and halting the inevitable. It could not have been received worse.
Abandonistas throughout Spain engaged in mass outcry. Soldiers in the ports, destined to be sent to the "Hell" of the Rif led mass mutiny, decrying that they would not waste their lives on Morocco. As the military was left helpless or against the nation, Spain fell into disrepair. What little remained of the Spanish Rif fell to the nascent Republic, while cries against the government merely increased at rapid pace. This would all come to a final head on New Years Day, 1922, as trade unions throughout Spain, led by the UGT and CNT announced a devastating general strike. Without the military to put down these protests, the situation rapidly escalating, King Alfonso XIII announced his official abdication as King of Spain on February 3. Near immediately, the CNT and UGT would seize control of parliament, proclaiming the "People's Republic of Spain" and the first constitutional convention.
For a time, peace it seemed had fallen upon Spain. The long abolished fueros system was reestablished, at least in part, as the People's Republic granted "autonomous statutes" to the Basque and Catalan peoples, allowing for provisional governments to be established in the autonomous statutes, to give way to elections. A peace treaty would be negotiated with the Republic of the Rif, though in truth it was little more than a complete and utter capitulation to Rifian demands, and the military began to quell. Unfortunately, this would only be "for a time," little more than a blink of an eye in Spain's troubled history.
The military, which was initially complacent to the People's Republic, rapidly began recovering from the trauma of the Rif, and, in its conservative leadership (left untouched by the Republic out of fear of a coup) rapidly began to plot. The already left-leaning Republic was quickly becoming far-left underneath the tutelage of the "trade union puppet government," and reactionaries throughout Spain were quickly outraged. The final straw would come in the appointments of the Basque and Catalan provisional governments, with the pro-autonomy Basque Nationalist Communion (Comunión Nacionalista Vasca) being appointed in Basque and, even more dreadfully, a near solely CNT government being appointed in Catalonia.
September 23, 1922, a mere eight months after the People's Republic's establishment, a vicious countercoup took place, as Captain General Miguel Primo de Rivera seized control of Parliament, declaring the arrest of every member of government for "treason against the King and Spanish people," installing himself as Regent of the "Spanish Kingdom." The Basque and Catalan regional governments, aware that abolition of their autonomy (and likely arrest of their parliaments) was imminent, were immediately alarmed, and seeking no other choice, immediately appealed to French protection, announcing their secession from the "tyrannic dictatorship of Madrid." They would not be the only in Spain seeking French protection, as Prime Minister Julián Besteiro and President Manuel Azaña, first and last of their position in the People's Republic, sought refuge in Paris, along with several other leftist leaders.
The French response was immediate, as Red forces immediately occupied Catalan and Basque soil declaring it to be underneath their protection. So too was the German response, however, as Spanish colonial possessions throughout Africa were seized by greedy German forces, giving a death blow to the Spanish Colonial Empire. Portugal too would seek to gain from the opportunity, capturing the long disputed region of Olivenza to add to their nation. Still, after brief diplomatic crisis, Rivera seemed unwilling to go to war with the French, Portuguese or German nations, recognizing his own precarious position as ruler of Spain, choosing instead to consolidate his rule and exchange great many diplomatic insult and propaganda.
In Catalonia, the unburdened CNT government quickly reorganized itself as the "Free Territories of Catalonia," or to be more accurately, unorganized itself, with a near complete degeneration of the state along anarchist lines. The only remnants of state authority were self-organized "Revolutionary Councils" throughout the nation, and freely organized "Militias of the People" both deemed necessities to defend the "nation" against the threats of Rivera. These proclamations were met with cheers throughout Barcelona, as the Provisional Catalan Government issued its final decree, a complete dissolution of itself.
In Basque, however, the newly decreed "Republic of Vasca" took much the opposite choice. Organized under the more conservative CNV, there was a practical horror throughout the nation at the thought of the Red French protection, and the possibility of Socialist coup. Strongly centralizing its rule underneath the Vascan Assembly and President, the Vascan Republic put particular emphasis on the creation of a strong military, not just to defend against Rivera, but also their own French protectors. Stuck between a rock and a hard place, the Republic of Vasca is left with many uncertainties about its future and potential development.
All is not well in paradise, however, for even as the people celebrate their independence, cracks rapidly have begun to appear on the surface. French troops dispatched to protect their nations are infamous for their poor conduct, and, particularly in Catalonia where there is no central government to keep the peace, rumors swirl of pillaging, robbery, murder and rape by these occupying forces. The Catalan transition into anarchism, once lauded, has been anything but smooth, as Revolutionary Councils often find themselves in firm dispute with each other and petty squabbling fills their days, even as the ineffective Militia of the People seem to join in the same debaucheries of their French counterparts, often spoken of more with fear than reverence. Even more concerning is rapid increase in pressure on Catalonia from France, as many Revolutionary councils speak of offers of "annexation" into the French "nation," the joining of two revolutionary movements into one, and concerningly, the belief that these offers will eventually become ones "they can't refuse."
In Vasca, the poor conduct of French forces has led to anti-French sentiments becoming widespread throughout the nation, as even Vascan soldiers will sometimes attack Frenchmen they see on the street, and they do not limit themselves to soldiers. Rumors of French or Spanish conspiracy abound, as an increasingly paranoid Vascan Assembly does everything they can to stave off a seemingly inevitable overthrow. Worse, if the mutterings of French soldiers and intelligence from Madrid are to be believed, they may not wholly be incorrect, as Frenchmen quickly tire of their horrible treatment by Vascan countrymen. A conservative, Catholic nation under the protection of Red forces, it is no wonder that conflict seems so ready to brew.
It is not like, however, the alternative to French protection is any more appealing. With brutal purges of Spanish leftists, whom he has accused of conspiring with Catalan and French intelligence, and military junta rule, Rivera has quickly transformed Spain into the model despotic state. Withdrawing all diplomatic relations from the Central Powers, and even neighboring Portugal, over their seizure of Spanish land, Rivera finds himself increasingly isolated upon the European continent, and the poor leader is rapidly beginning to crack underneath the pressure. Military Governors throughout the nation slowly begin forming their own cults of personality, as the good Regent finds himself gradually losing his grip upon the nation. Half-finished public works projects, formed out of the hope of lowering unemployment and winning support, dot the Spanish countryside. Sitting upon a crumbling throne of blood and unfinished buildings, Spain's colonial empire lost, and even core parts of the Iberian peninsula occupied by foreign foes, Rivera's empire of military warlords and purges is a far cry from the golden age he promised. Who knows how long it will last before the damn fool loses his head?
(Sorry for length, but that's my general proposal for the post-war years of Spain)