The national governments are elected.
People just tend to pay a lot less attention to how their national governments act on the EU.
The solution is not to throw the EU away, it is a massive good for all countries involved, it is to fucking hold your national governments accountable, and to demand more direct participation in the EU.