Reigning world champions Spain suffered a shock group-stage exit as goals from Eduardo Vargas and Charles Aranguiz saw Chile win 2-0 to seal their place in the Round of 16 at Brazil 2014.