If we try to understand the Allied view of the world in, say, 1941, it is by no means certain that Franco will stay out of the war. Spain entering the war would have significantly altered Allied war plans and resource allocation.
So: did Allied planners fear Spain's entry into the war, or 1) was Spanish military involvement considered unlikely 2) was Spain considered strategically irrelevant and no plans were made to divert substantial military power there?
Thanks for reading.
My knowledge on this is pretty narrow, but can hopefully offer some insight.
Allied planning for the European Theater of Operations was intense, contested, and highly dramatic. I cannot speak for the British and American attitudes toward Franco prior to December 1941...but I can go into the considerations and pulling motives that took place under Eisenhower's leadership in the War Plans Division, Operations Division, and ultimately as Commander of the European Theater.
Early in 1942, American leadership, with grudging support from the Brits and vocal (if infrequently heard) encouragement from Stalin, made plans to invade France late that year. Due to shortages of manpower, equipment, and shipping, as well as British hesitation, this Overlord-esque plan (Operation Roundup) was ultimately scrapped.
However, due to public pressure to engage in military action before the year's end (some historians speculate on whether or how much the '42 US elections exasterbated FDR's urgent push for action), Roosevelt, Marshall, and Eisenhower were committed to engaging somewhere. They preferred North Africa, (though Eisenhower still strongly favored Roundup and thought North Africa a distraction) while the British were desperately trying to shore up their military and political holdings in the middle-east, Egypt, and Greece.
The Allies compromised to come up with Operation Torch...which is where they had to factor in Franco in both their primary and contingency plans. Eisenhower insisted that the force for Torch needed to land in multiple locations, and take Casablanca, Algiers, Oron, and Sfax quickly. He surmised that this would be the best way to keep the Spanish and local Vichy troops out of the open fighting.
(There were also other considerations, front and center being the invading allies' relationship with Vichy French forces in North Africa. Eisenhower and the Combined Chiefs of Staff had similar objectives towards the French and Spanish: keep them neutral, so the Anglo-American forces could engage German troops 1v1.)
The Operation was delayed by months, and ate up significant shipping and landing craft. This was largely to ensure that 3 landings could take place...giving the Allies the highest chance of success. The CCS estimated that a partial failure in Operation Torch could threaten Franco enough where he'd be worried about an Allied invasion while in a position to preempt it. At some point along the way, broad plans were made to invade Spain through Gibraltar, opening another route to mainland France. These were never seriously considered or deeply fleshed out however.
TL;DR Even with their stellar intelligence, The British and Americans both overestimated Franco's willingness to actively join the conflict. This led them to plan Operation Torch more cautiously, as well as Operations Anvil and Dragoon later on.
(Sources: Stephen E. Ambrose's Supreme Commander Bruce Lee's Marching Orders)
You will likely find the FAQ section on neutral Spain to be of use. I'd especially recommend /u/kieslowskifan's response.