She was proposed by the European Council (made up of more or less democratically elected heads of state/government) and approved by the European Parliament (democratically elected representatives)
That is as "elected" as many heads of government i.e. any prime minister system
Directly electing presidents doesn't necessarily lead to better outcomes