Spain, which had reached the tournament for the first time since 1999, was penalized after the team was found to have used an ineligible player during qualifying.