More than 300 million voters in the 27 countries that make up the European Union are heading to the polls to elect the new European Parliament’s 720 members. But in casting their ballots they’ll do more than that.

The new balance of power in the Parliament will shape the next five years of important European policies at home and abroad, including on climate, migration, Ukraine and the Middle East.

The Parliament approves or rejects E.U. legislation, including the bloc’s $1 trillion-plus budget and the bloc’s top leadership. It also says yea or nay, by simple majority in a secret ballot, to the appointment of the president of the E.U. executive branch, the powerful European Commission.

In the 2019 election, Ursula von der Leyen, a conservative, came dangerously close to being rejected as the European Commission president, securing the Parliament’s approval by just nine votes. This time, Ms. von Leyen, likely to be designated as president for a second five-year term, could face worse odds. As with many incumbents, she is criticized for her handling of the last five years’ crises.

Polls predict gains for hard-right parties in the Parliament and a shrinking center. This could force her to cut a deal with radical right-wing parties to get appointed, and in the process risk losing centrist support.