The country’s next chancellor will have to fix the economy, tackle an immigration crisis and help unite a continent facing geopolitical headwinds.