Sanchez's Socialists lost to two right-wing parties with sharply different approaches to issues Sanchez championed, from migration to housing policy.