The high court rejected a bid by Poland and Hungary, which argued the budgetary instrument exceeded EU competences.