When the small business run by Kristina Melnytska’s father began to struggle in 2014 he did what hundreds of thousands of other Ukrainians were doing and moved his family to Poland.

Melnytska, then 19, enrolled in a university in the eastern city of Lublin. She worked long nights in a kebab shop, where she was paid about £1 an hour. Five years later she is still here and one of an estimated 2 million Ukrainians working and living in Poland.

While Poland’s rightwing populist government has rejected resettlement quotas for refugees from Syria and other conflict zones, the country has quietly accepted what may amount to the largest migration into a European country in recent years. There are about 400,000 Ukrainians on proper contracts but many more who work in the parallel economy or are short-term, seasonal labourers.

Their presence helps replace the labour shortage created by the Poles who have left for Britain, Germany and other EU countries since Poland joined the bloc. The numbers also tell a story about Ukraine, where the economy tanked after the 2014 Maidan revolution and the war in the east.

On Sunday the country will vote in a presidential election in which the television comedian and political neophyte Volodymyr Zelenskiy is expected to score a crushing victory over the incumbent, Petro Poroshenko, in a sign of just how dissatisfied people are with widespread corruption and the lack of economic opportunities over the past few years.

“We have ended up with a whole generation that has gone,” said Irina Vereshchuk, a former mayor of Rava-Ruska, a town on the border with Poland. “Poland has taken our best minds, our best labourers.”

In towns and cities across Ukraine there are advertisements and recruitment drives to find people keen to move to Poland for higher salaries. According to data from the World Bank, Ukraine is now the biggest recipient of wage remittances of any country in Europe, with £11bn being sent back to the country by workers abroad last year, amounting to 11% of the country’s GDP.

A banner in Bydgoszcz, Poland, advertises cheap bus transport to Ukraine. Photograph: NurPhoto/NurPhoto via Getty Images

Olena Babakova, a Ukrainian journalist who moved to Warsaw in 2008, said that while there were no Ukrainian-majority areas of Warsaw or other cities there was what she described as a “horizontal ghetto” of her fellow nationals. “The barmen in the bars I go to are Ukrainians, my hair and nails are done by Ukrainians and some of the bank clerks are Ukrainians.”

Poland for a long time had a programme allowing short-term workers to obtain visas, but things are even more simple, with the EU granting Ukrainian citizens visa-free entry since 2017.

Many Poles say the government is asking for trouble by allowing so many Ukrainians to settle in Poland.

“Ukrainians are quite close to us physically and culturally, but if you build a multinational country you get political problems,” said Krzysztof Bosak, a former MP and deputy leader of the National Movement, a nationalist political force. “Economic mass migration for a country is like cocaine for a workaholic. It makes you more effective in the short term but after, the problems start.”

Many Ukrainians do low-paid, low-skilled jobs the Polish locals do not want. Unlike Polish workers in other EU countries, however, the Ukrainians in Poland have few legal safeguards to fall back on.

In Lublin, Melnytska said she frequently suffered abuse at the hands of drunken customers while working in the kebab shop. “People shouted that I should go home and was ruining Poland. One time someone threw a kebab at me, and there was one guy who said he was going to wait outside and attack me on the way home.”

She called the police, who did nothing except laugh at her and tell her that in Poland there is freedom of speech, she said.

Ruslana Poberezhna, a 20-year-old from the Ukrainian city of Vinnytsia who came to Lublin and found work as a waitress, said she was paid a third of the amount the establishment’s Polish workers were paid, and when she complained was laughed at and told she had no rights.

Anti-Ukrainian graffiti inside an underground passageway in Krakow. Photograph: NurPhoto/NurPhoto via Getty Images

“There’s absolutely nobody for them to turn to,” said Anna Dąbrowska of Homo Faber, a Lublin-based NGO that offers advice and free language lessons to Ukrainians and other foreigners to help them integrate. There are no government-organised or subsidised language programmes for immigrants. She said she was frequently approached by people who had suffered racist abuse or had problems getting their salaries.

An imminent easing of German labour regulations means many Polish employers fear they will lose their Ukrainian workers to higher salaries farther west. So far, though, the Ukrainians continue to come. At Lublin bus station, most of the adverts are in Ukrainian, offering arriving workers cheap sim cards, banking and other services. There are 17 departures per day to Kyiv and many more to other cities across Ukraine.

For Polish nationalists, according more rights to Ukrainians would be a second mistake after allowing them entry in the first place. “The vast majority understand they are guests here and they should be careful and not talk about sensitive issues. If they get citizenship, they won’t be as shy as they are now,” said Bosak.

History remains the trickiest subject, especially the massacre of Polish civilians by Ukrainian nationalist forces during the second world war. A monument to the victims was erected last year in Lublin. Melnytska said she has learned to avoid talking about history with Poles, fearing it will end up in accusations and abuse.

For many Ukrainians, carving out an existence in Poland, despite all the hurdles they face to integrate, is still a more appealing prospect than the one that waits at home.

Melnytska said despite the hardships during her four years in Poland, she planned to stay. She now speaks fluent Polish, has a Polish boyfriend and next year wants to apply for citizenship.

Dmitry, from a small town close to Kyiv, worked in a management position for a large multinational until he relocated to Warsaw with his family two years ago. Now, he drives an Uber in the Polish capital, and by working 70 hours per weeks he can earn about 7000 Zloty (£1,400) per month.

“It’s more than I earned in Ukraine, but it wasn’t really about the money. I was just tired of the unpredictability of life in Ukraine, with revolution, war, uncertainty. I just wanted to feel settled somewhere.”

Additional reporting by Paulina Olszanka