Spain was a neutral state in the very contentious pre-war years and merely continued this policy of neutrality when World War I broke out. It continued its neutrality until the commencement of the Spanish Civil War in 1936.
The war would have continued for a longer period. By this stage of the war Germany had no chance of victory. The Americans and Soviets where out producing the Germans in war machinery by vast quantities, the Germans also lost a huge number of soldiers and they could no longer be replaced.