European countries are among the gloomiest in the developed world, with citizens pessimistic about their national prospects, their youth and the world in general, according to a major global survey shared exclusively with the Guardian.

As European parliamentary elections that will set the tone and direction of EU politics for the next five years loom, the YouGov-Cambridge Globalism Project paints a portrait of a public worried about living standards, public safety, healthcare, education, community and the future of the planet.

Q&A What is the YouGov-Cambridge Globalism Project? Show Hide The project is a new annual survey of global attitudes in 23 of the world's biggest countries, covering almost 5 billion people.

The 2019 survey canvassed 25,325 people online across much of Europe, the Americas, Africa and Asia in February and March.

Questions about populist attitudes and convictions were inserted in order to derive a "populist cohort", and discover what this group of people think about major world issues from immigration to vaccination, social media and globalisation. The full methodology can be found here.

Respondents in eight European countries – Denmark, Germany, Spain, France, Italy, Poland, Sweden and the UK, the combined population of which covers almost three-quarters of the EU population – tended to have much lower levels of optimism for their countries’ futures.

Almost two-thirds of French respondents described themselves as either fairly or very pessimistic about France’s future, compared with 13% who said they were optimistic. More than half of British respondents were gloomy about their country’s prospects, as were half of Italians and Spaniards about theirs.

Britons most positive in Europe on benefits of immigration Read more

By contrast, the 23-nation survey found far greater optimism in emerging and newly developed economies. Of 1,021 Chinese people in the sample, 81% expressed optimism, as did 71% of Indonesians and 73% of Indians.

The French were the most pessimistic of any national grouping surveyed on their short-term future: when asked to think about the next 12 months, 27% expressed optimism about their own future, 18% were optimistic about the future of their local area, and just 8% were optimistic about the future of the world.

Asked about the prospects of future generations, 7% of French people thought they would experience a better standard of living than their parents compared with almost 74% who said things would be worse, a view shared by 63% of Spaniards, 59% of Italians and more than half (53%) of Britons.

The results hint at a mood of disaffection and cynicism among swaths of the European electorate as it prepares to vote later this month. The past five years of the outgoing European parliament have been perhaps the most testing in the history of the EU, with debt and migration crises being compounded by the Brexit debacle.

Economies are struggling, protest movements are on the rise and rightwing populists are eyeing an opportunity, having seized on the disaffection to perform strongly in national elections across Europe in recent years.

Matthijs Rooduijn, a political scientist at the University of Amsterdam who helped analyse the YouGov data, found people with strongly populist beliefs were among the most likely to feel pessimistic. Across the eight European countries surveyed, populists were more than twice as likely to feel pessimistic about their country’s future.

The effect was magnified in France and Germany, where people with strong populist views were four times more likely to be pessimistic.

Rightwing populist parties, such as Marine Le Pen’s National Rally in France and Matteo Salvini’s League in Italy, are projected to perform well in this month’s elections, with polls suggesting they could increase their share of MEPs.

Theresa May's fans in Nigeria – and other unlikely sources of political support Read more

However, the roots of European pessimism may be longstanding. Josef Janning, the head of the Berlin office at the European Council on Foreign Relations, said Europeans had “a certain scepticism about the world” that stemmed from “a century of European decline”.

“For India and China, the past 50 years have been half a century of enormous development, lifting hundreds of millions of people out of desperate social and economic situations. Even though they are far from where Europe is today, they are rising.”

In contrast, he said, many Europeans had “some scepticism” about whether their children would lead a better life.

German pessimism was especially striking, Janning said, because the economy was doing well. He attributed the gloomy mood to uncertainty about Germany’s future in the era of Donald Trump, Vladimir Putin and a rising China.

Facebook Twitter Pinterest Germans are pessimistic despite the economy doing well under Angela Merkel. Photograph: John MacDougall/AFP/Getty Images

This perceived “unfavourable international constellation” raised questions about the longevity of Germany’s economic success, he said. “How long can the current positive economic environment for the Germans last? More and more people doubt that it can.”

Claudia Senik, a professor at the Paris School of Economics (PSE), said French national pessimism long predated the 2008 economic crash.

“It is not due to the crisis, it is really about the transformation of economy and society and how the welfare state has been adapted … income equality and our relationship with market economy and again the place of France in the world. I think it has to do with a certain level of aspiration that is difficult to fulfil,” she said.

Referring to the results of a quarterly survey she manages at the PSE’s Wellbeing Observatory, she added: “We see that all the variables that relate to personal life, social life, etc are rather OK. What is really bad is the questions about the economic prospects of the national economy, finance and economic prospects.”

There were also deep-rooted cultural causes, she said. French people looked back to “a mythic golden age when France was great”, whether that was the Enlightenment, French empire, the belle époque, or the revolutionary period. The idea of a golden age meant “we are always dissatisfied about the world as it is”.

“I would call this cultural because it creates a scepticism, a belief that things are never going to get better, which is self-reinforcing … [but] it is not completely inevitable.”