Turkey has chosen a bad time to enter, they should of entered when Greece was still free. Ultimately their ships will have little effect as they have so few they'll need them to guard their own coastline so they can't help the British farther out than say Cyprus.
Their military can harass the back lines of the Germans seeking to draw a little pressure off the Russians. The danger here is that German divisions could choose to knock Turkey out as a result, using Italian troops from Greece to attack into Turkey as well as the retreating divisions from Russia.
This would probably help Russia out in the short term which is good because they needed a second front and well the British and Americans are being slow on that front.
Spain's entry has much more dire consequences for the alliance. Though she lacks Battleships and Carriers having lost her dreadnoughts in the civil war she does have submarines and air power. Operation Torch is in serious danger.
Not only can the German U-Boats attack the convoy SL 125, but they have enough subs with the Spanish ones to also pick off some of the Operation torch troop transports.
German and Spanish air support from Spain will make landings of the Center and Eastern Task Forces nearly impossible. The Tuskagee Airmen on their first combat mission will probably suffer heavy losses trying to guard the convoys. The loss of these expert pilots will have severe consequences for years to come, they were one of the most successful bomber escorts in the war, they never lost a bomber, without them there or at full strength all future bombing missions they would have covered are jeopardy.
I believe both the Center and Eastern Task Forces will have to divert after losses to the Western Task Force zone before they pass Gibraltar this means the important ports/airbases in Vichy France will remain intact.
Spain's army is going to attack Gibraltar and cut off its supplies as well starving it to death if need be.
As the Western Task Force and the others are clearly doing an amphibious assault the Spanish subs will target the troop transports. Probably half the landing force in all three Task Forces will be lost. This will cause some initial problems as they try to secure Casablanca but I do believe they'd still make a beachhead. This is going to be a much more bloody and longer term African campaign than historically and with Gibraltar lost they will have no chance to easily resupply as they move east. That means long supply lines in line of Spanish, German and Vichy French bombers. The subs and u-boats will make resupplying Africa without Gibraltar exceedingly difficult, in fact I wouldn't be surprised to see the Allies ultimately lose in Africa with Rommel whose supply lines are now secure running over them.
Gibraltar's loss means that the Axis will dominate the Med, and will easily take control of all of it by early 43. This will take time as they'll seek to take Malta etc before concentrating their air and naval assets against Turkey.
Still Turkey's entry won't make it a total wash as they will give Stalin some breathing room. But it is doubtful without reinforcement that Turkey will hold. Germany most likely will entrench before the Soviets and attack Turkey, this would give them another zone to launch attacks into the Soviet Union.