Amid a clutter of 24-hour arc lights, gigantic cranes and dumper trucks, a behemoth is rising out of a field of churned mud on the outskirts of Chengdu in south-west China. Commuters skirt its vast perimeter fence on their way to the new metro link that cuts under the city. They barely glance at what looks like just another huge construction project in a cityscape that changes every month.

This project, though, is different. When finished later this year, its developers proudly boast, it will be the world's largest standalone building. The New Century Global Centre is a leisure complex that will house two 1,000-room five-star hotels, an ice rink, a luxury Imax cinema, vast shopping malls and a 20,000-capacity indoor swimming pool with 400 metres of "coastline" and a fake beach the size of 10 football pitches complete with its own seaside village. Alongside will be another massive and futuristic structure, a contemporary arts centre designed by the award-winning Iraqi-born architect, Zaha Hadid.

The scale of the centre is a sign not just of the ambition of Chengdu, capital of Sichuan province, but a potential vision of the future. Last week Chinese authorities announced that for the first time more than half of the country's population were living in cities, 690.79 million, an increase of 21 million, compared to 656.56 million rural dwellers. The new urban-rural balance was a benchmark attained by the UK in the late 19th century and the US in the first decades of the last century – in 1800, only 3% of the world's people lived in cities. But the scale and speed of urbanisation across the developing world today are unprecedented – throwing up a string of megacities, from Jakarta to Istanbul, São Paulo to Cairo. Poor rural families flooding into the world's urban population centres bring challenges that have never before been seen – nor met.

Chengdu made the headlines in Britain late last year when it exported two pandas to Scotland, and it is developing a reputation as the centre of Sichuan's prized cuisine. But few in the west have paid much attention to the astonishing rise of Chengdu, despite a population (including its rural hinterland) of more than 14 million and its evident economic power and growing sense of self-confidence. Few have heard much either of cities like Ghaziabad, Surat or Faridabad in India, or of Toluca in Mexico, Palembang in Indonesia or Chittagong, the Bangladeshi port. Or of Beihai, another Chinese city on the northern coast. But this is likely to change. Each of these cities is among the fastest-growing settlements in the world. Their cumulative growth is set to usher in a new era of city living, changing the face of the planet. Beihai, which already has 1.3 million inhabitants, is set to double its population in seven years. The municipality of Chengdu will reach 20 million. Ghaziabad, now itself part of the urban sprawl of the Indian capital Delhi, is already home to nearly four million people.

Crucially, though experts estimate that the number of megacities of more than 10 million inhabitants will double over the next 10 to 20 years, it is these less well-known cities, particularly in south and east Asia, that will see the biggest growth. Predicting what the new era will bring is taxing economists, senior businessmen, security experts and strategists across the world.

Optimists see a new network of powerful, stable and prosperous city states, each bigger than many small countries, where the benefits of urban living, the relative ease of delivering basic services compared to rural zones and new civic identities combine to raise living standards for billions. Pessimists see the opposite: a dystopic future where huge numbers of people fight over scarce resources in sprawling, divided, anarchic "non-communities" ravaged by disease and violence.

Nowhere is this more evident than in India, where years of underinvestment, chaotic development and rapid population growth have combined with poor governance and outdated financial systems to threaten an urban disaster.

In the middle of last week, Prakash Kumar spent a morning helping to push a broken-down van loaded with bags of cement up a flyover in southern Delhi. He was happy to do so, he told the Observer. A recent immigrant to the capital from the poverty-stricken state of Bihar, the 24-year-old had picked up work helping a relative – another migrant – on a building site. For the equivalent of £3 a day, he was unloading emergency supplies of construction materials for contractors busy putting up flats for the new Indian middle classes. His dream is to get a job as a security guard, which pays around the same but simply involves sitting on a stool guarding a shop at night. For shelter, he shares a room in an illegal slum tenement with a dozen other labourers.

"At least there's work," he said. "In my village there is nothing. I send the money home to my family and we can eat."

The story of India's urbanisation – though slower than that of China or many other developing countries – is made up of hundreds of millions of variants on Kumar's story. Some 290 million people were living in cities in India in 2001, a figure that rose to 340 million in 2008 and is set to reach 590 million, around 40% of the population, by 2030. By that year, business consultant McKinsey and Co predicts, there will be 68 Indian cities of more than a million people, 13 with more than 4 million and six megacities with populations of 10 million or more. More than 30 million people will live in Mumbai and 26 million in Delhi.

It is far from sure that India's notoriously chaotic and inefficient systems of government can cope. At current rates of investment, McKinsey says, India's already congested cities will face gridlock with only a quarter of the necessary trains and metros and a severe shortage of water. Many inhabitants will have no drinking water at all and up to 80% of sewage will go untreated. In all more than a trillion dollars needs to be invested in infrastructure projects alone, it estimates.

According to Dr Rumi Aijaz, of the Delhi-based Observer Research Foundation, it is unlikely that this can be achieved. "Our urban areas are in a raw form. All the basics are at a very low level. And the Indian state has been trying for a very long time to address this but a lack of capacity and endemic corruption has meant not much success," Aijaz said. "The future is bleak. The situation is going to worsen."

The new Chinese cities, too, have their problems – though arguably less severe than those in south Asia. For every pound Indian authorities invest in urban infrastructure, their Chinese counterparts spend seven. This, however, is still insufficient to cope with the speed of urbanisation. Chengdu has become a test case for how China resolves these varied challenges. It has been named as one of China's "pilot reform regions", giving local authorities extraordinary powers to experiment.

The issue is becoming ever more pressing – rural unrest over continuing poverty as well as land seizures due to voracious development is widely reported, even in China's heavily censored media. Chengdu's mayor, Ge Honglin, claims that the city has avoided some of the problems associated with migration into the cities by encouraging families to stay in the countryside. "The first thing I did was to improve the conditions – schools, shops, garbage collection, the sewage system. We had to cut the gap between rural and urban areas. If people could have a brighter future in the countryside, they'd stay there. So we're not seeing people swarm into the city… Instead there are people in the city considering moving to the country."|

Chengdu modified the household registration system in use across the country, known as hukou, which previously prevented rural migrants from registering as city dwellers and benefiting from the city's welfare services. But at the same time it has extended such services into the surrounding countryside. Farmers as well as urban workers can now receive pension insurance, allowing women over 55 and men over 60 to claim a rudimentary pension once they have paid premiums for at least 15 years.

Hundreds of new schools have been built in the villages surrounding Chengdu; successful headteachers from city schools are being recruited to move into the countryside, while partnerships between struggling rural schools and the best urban schools are being set up.

The motivation for all these policies is clear – to persuade millions of rural families around Chengdu that they have an economic stake in China's rapid growth. Part of the strategy involves pouring resources into satellite towns and villages, and creating thousands of new rural communities where families can be rehoused. "Chengdu is the only super-large central city that has narrowed the urban-rural income gap alongside rapid economic growth in China," Ge says.

He has also taken a zero-tolerance approach to urban squalor – a policy facilitated by China's authoritarian culture – which involves patrols with mobile phones and cameras scouring the city reporting broken advertising hoardings, missing manhole covers and other minor problems. "You can barely see a beggar in Chengdu," Ge said. "We have a special system for monitoring them, and it works. Beggars are taken to the assistance centre, where they are given food and shelter and money to take them back to their home. If I say there are no more than 10 beggars on the street you will think there's some sort of tyranny, but there isn't. We're trying to solve their problems."

Even if the demands for power, sanitation and security can be met, however, the new cities, whether of 30 million or five million inhabitants, present a cultural challenge: how to establish a sense of community in huge and complex societies. In one recent book, The Spirit of Cities, two political theorists argued that the distinctive spirit of the city states of ancient Greece should be rediscovered. Daniel A Bell, of Tsinghua University in Beijing, and Avner de-Shalit, of Hebrew University, Jerusalem, argue that "civicism", or attachment to a city and the assertion of its local identity, brings numerous benefits, ranging from curbing excesses of nationalism to potentially sparking economic renaissance. "We say that though the scale is different compared to ancient cities, modern cities can still express an identity," Bell said last week.

In Chengdu, there is abundant evidence of the city's efforts to preserve a sense of cultural identity amid bewildering change. Ancient districts that were knocked down have been lovingly recreated to house market stalls selling highly prized Sichuan delicacies. They are packed with locals, in stark contrast to the cavernous and empty modern malls on the outskirts of the city. Last autumn's Chengdu biennale, an exuberant exhibition of modern art and architecture filled with tributes to traditional techniques and rural themes, was housed in a refurbished Soviet-built factory complete with original murals of workers and peasants, an ironic reference amid the throngs of students and children who throng the cafes nearby.

There are few such initiatives in India but a sense of community among city dwellers is nonetheless often present. Inhabitants of Mumbai can be fiercely proud of their city, particularly when it is compared to Delhi. Smaller "metros" such as Bengaluru and Hyderabad also have well-defined identities, reinforced by local languages and cultures as well as a range of local media.

For Prakash Kumar, the simple fact of making a living in the capital, however basic, is a source of pride. "The rest of my family will come and join me one day," he said.