A republican Spain might have avoided Hitler's shift from the west to the east, it might have delayed the invasion of the USSR for a year at least... i just don't think that with a republican Spain, the German army would have stopped in the Pyrinees. Also, Spain is not a good terrain for blitzing, although the spanish army wasn't too good.
Another possibility: if the Spanish Republic becomes a
de facto Soviet client state, then in 1939-1940, it will follow the Moscow line and not support the Allies or challenge Germany.
This leads to the question of what (if anything) Germany does about Spain before or during BARBAROSSA.
ISTM that by 1941, Hitler (and most Germans) was cocky enough to think they could take out the USSR
and mop up Spain on the side. I think this would be proposed to Mussolini as the main task for Italy; which probably eliminates the Italian invasion of Greece. Attacking Spain would be a "red flag" toward the USSR, so it wouldn't happen first.
Another issue is the status of Vichy France: Germany had a narrow lane to Spain and Italy had none. So it seems that an Axis attack on Spain requires French cooperation. I think that could be bought in 1941; Petain would not be happy with Reds on France's border.
Assuming that France goes along - ROLAND, a parallel operation to BARBAROSSA, goes off at the same time, or a little later. (It would be harder for the Axis to maintain operational secrecy while massing in southern France, unlilke eastern Europe.)
Although in fact they couldn't get it, because British air recon and SIGINT (i.e. ULTRA) would expose it anyway. ULTRA and other sources also exposed BARBAROSSA, it was just that Stalin refused to listen. But they would try, not knowing all that.
Or maybe ROLAND could be used as a stalking-horse for BARBAROSSA. Stalin would be willing to sacrifice Republican Spain to keep Germany occupied for a year, and the Germans may let him see
those preparations to foster his illusion.
Britain will of course anticipate ROLAND, and try to help Spain, but will have limited ability to intervene. It could be loosely analogous to OTL's Greek campaign, but on a larger, longer scale.
Another question is what Portugal does. Portugal had a reactionary dictatorship with fascist tinges in the 1930s. They didn't like the Republic much, and would like a People's Republic even less. At the same time they didn't want to be in the war, and had a long history of alliance with Britain.
ROLAND probably also pre-empts the deployment of the Deutsches Afrika Korps to Libya. The Italians in Libya hang on, trembling, but the British don't have the muscle to push on for several months; they still have East Africa to clean up. Then in June comes ROLAND and all British resources go to Spain.
Britain gets one immediate bonus: her ASW forces can now base out of the Canary Islands, which covers a lot of the Atlantic.
Of course that assumes the victorious Republic took control of the Canaries; could they do that? There's a similar question regarding Spanish Sahara and Spanish Morocco. OTOH, if these areas are still held by Nationalist holdouts, in 1939-1940 the British may just mop them up. Maybe not until late 1940, when Britain is getting desperate. The Canaries, easily, and also Spanish Sahara; but not Spanish Morocco, which is the most likely to be regained by the Republic anyway.
It's also likely to fall to the Axis once mainland Spain is taken.
British bases in the Canaries offset the loss (or at least neutralization) of Gibraltar and access to the Atlantic for Axis subs and raiders from Spanish bases Britain cannot interdict as it did the French Biscay ports.
Another question is how much France is compromised by its facilitation of ROLAND. Assuming that ROLAND succeeds, and the Axis gains all mainland Spain: Does France allow Axis forces to pass through Morocco to Spanish Sahara? If there is a British force there, then Morocco becomes comparable to OTL Syria, but with the Axis present in strength. The area is a long way from both British and Axis base areas, and neither side can deploy there in
great strength; but the Axis has more land strength to deploy in 1941, and a workable sea/land/rail line of communication. Can the British put enough there to hold out?
Maybe they can. It is after all mid to late 1941, and Lend Lease has come on-line, and Britain has recovered from the nadir of 1940. So there is an on-going campaign. As part of it, Britain may just seize Dakar and the rest of French West Africa. OT1H, the Vichy authorities would resist; OTOH, the much greater involvement of Vichy with the Axis would weaken Vichy's grip.
What else? Another ongoing campaign in Libya, with the Axis getting more passive assistance from the French in Tunisia. Eighth Army will get much less support, as Spain/NW Africa take priority.
So - if the Pacific crisis brings the U.S. into the war as OTL... the first target of U.S. forces in the "Greater ETO" would be NW Africa, but on land, not by sea.
The Allies will liberate all North Africa, probably in early 1943. Another question is what Vichy forces do. Will they be sucked into the ongoing campaign on the Axis side? And if so, how many will go and how many will desert or switch to the Allies?
Once the Allies have Morocco, they will invade Spain. It will be something that can be done at once, and there will be intense pressure to liberate Spain. It's less of a distraction from direct attack on Germany than the OTL Italian campaign. It probably displaces OTL's Italian campaign almost completely. (When the Allies get to southern France, the Italians dump Mussolinia and surrender.)
The fighting in Spain could be weird. OTL, Franco's side was dominant, and if not universally popular at least accepted; and fairly popular among the Spanish right. (When the formation of the "Blue Division" to fight Bolshevism in Russia was announced, the recruiting offices were swamped.) OTOH, Axis occupation and "liberation" from the Reds could be heavy handed; and it would lead to acute food shortages. Even many rightists would be disillusioned about Germany and especially Italy, and not have much interest in fighting for the Axis. Leftists would of course rally to the Allies.
One question is what Portugal would do. Assuming that Portugal had managed to stay neutral all this time, that neutrality would come under severe strain with the war on the border. If the Allies liberated enough of Spain to protect Portugal from attack - would the Allies demand the use of the port of Lisbon? If so, would that not effectively force Portugal to join the Allies? A fairly obvious analogy is Salonika and Greece in WW I.
The Allies enter southern France in early 1944. Then perhaps in mid-1944, a surprise Channel crossing to strike the Axis rear (though not as large as OTL D-Day). The Germans fall back and are eventually crushed in 1945.
Consequences: Spain gets all torn up again; but after the war gets lots of U.S. reconstruction aid.
Italy avoids getting torn up, mostly. A fair amount of bombing damage, some fighting in the northwest, and a lot of casualties. But no partisan fighting. Italy nonetheless is forced to give up its African colonies and the Dodecanese Islands, and also pull out of Albania and cede Zara to Yugoslavia.
France is going to be all torn up. More fighting in the south and south west, less in Normandy. But a lot more bitterness about Vichy's actions.
A minor knock-on: no Iraq campaign. Without Rommel's victory in Libya and the German sweep into Greece, the Iraqi nationalists won't feel it's time to take on the British.
Yugoslavia survives as a neutral, so do Greece and Bulgaria.