Spain does not play with a lot of width, and their left back never advances. So the main drawback of 3-5-2, its weak wings, will be less of an issue. Also since Spain attacks (well sort of), it does so with 7 players very close to each other, so Italy will have the numerical advantage, while playing with two forwards. Also a packed midfield will make Spain's passing game harder to disorganize the defense, particularly if Italy uses a sweeper.
All these of course on paper. Today I could not imagine how Germany could possibly lose