Actually Real Madrid don't have the best defence, in fact many people laughed at the notion that Ramos is a top defender.
I'd also argue Spain won so much in recent year not because they have a great defence, more like they just keep the ball better than anyone.
That's not to say Spain or Real madrid had a weak defence though. They had a defence that fulfilled their requirements, it was a
good defence, with incredibly athletic defenders extremely capable of dealing with explosive players. Not only that, Sergio Ramos is probably the best passing defender around at the moment, not just in skill, but also in understanding and contribution to offensive movements.
You have a defence with that insanity edge with pepe, skilled if not virtuous tacklers, and a prodigiously gifted defender in varane. All three of these defenders are incredibly physically gifted, all three are EXTREMELY good in the air (varane has a better leap then cristiano possibly, even despite being taller/stronger), all three options in varane pepe and ramos are very very quick, and between pepe and ramos, while they aren't defenders that stand out in history for their pure defensive skill, in this generation they are very very good, at certainly at the moment top 10-15 level.
Pepe and Ramos have both had outstanding international performances. Portugal in particular due to Pepe and the very underrated Bruno Alves/Rolando, had one of the best defences at Euro 2012 and progressed beyond expectation mostly because of that, their very underrated defence.
And if people laugh at the notion that Ramos is a top defender, they should laugh at Ronald Koeman too. Some people can't look at the big picture.
That's a different case from argentina. Zabaleta is an absolutely top notch fullback, and Demichelis is very good when he's focused, but he's still a defender that is so extremely liable to errors or poor decision making that it nearly negates his actually very very good defensive qualities.
Garay might be just 'good' at best, some will say that he's linked to top clubs, us even, as proof of some sort of talent, but if you want to talk about Ramos not being a great defender, then what is Garay, who couldn't usurp him or any of the madrid defenders in 4 years and was sent out on loan, when an 18 year old in varane managed to crack the starting team? He's a 27 year old that made only 31 appearances for madrid, and is still playing in the portugese league, which can't be considered on the same level of the buli, epl, la liga etc (even ligue 1 etc)
While Ramos had outstanding qualities in other facets which actually prove extremely effective and valuable, what is garay other then a 'good' defender?
Argentina have the worst goalkeeper of the tournament without a doubt to me in Romero. They have one unquestionably top class fullback, a great defender that can also cost you the game equally as he can be depended on, a 'good' defender in Garay, and after that, quite quite a thin defence in terms of qualities.
If there's one thing that's going to help argentina, it's going to be the use of mascherano as the shield of the back four, and better possesion of the ball to try to not need to put the defence into as little testing as required. I wouldn't count on Gago, he's been extremely off form at boca, but at his best he's a good distributor of the ball with two way ability and tempo control. The work of Di Maria will be key in midfield, as well as being a very difficult edge to guard offensively.
Possibly Argentina can work to protect their backline effectively, possibly they won't be exposed or Demichelis will go clean all tournament and be monstrous. You can't deny that Argentina have one of the weaker defences of the cup though. It's one i wouldn't have much faith in personally.