Spain's Socialist chief Pedro Sanchez is set to lose his bid to form a new government after key parties vowed to vote against him in an evening vote of confidence in parliament.