URBAN schools in Brazil could not keep up with the influx of migrants to the cities over the last three decades. Since 1979, chronic inflation has undercut teachers' salaries, forcing many to quit or moonlight. Inflation also weakened government finances, reducing investments in school buildings and other infrastructure. Poverty continues to force millions of children to drop out of elementary school to work. The results:* 17.5 million illiterates over age 15, out of a population of 150 million. Millions more are barely literate. * An estimated 5 million children who attend schools like Antonio de Padua Vieira that have three shifts or more. * Secondary school enrollment of only 3 million in 1989. Only 232,000 students graduated from college that year. Elementary school enrollment was 27 million. The biggest problem, says education expert Guiomar Namo de Mello of the University of Sao Paulo, is that "there are enough places for everyone, but the children stay in the system for more than eight years and can't finish," she says: "Schools are becoming warehouses for repeaters." The good news, says Ms. Namo de Mello, is a growing consensus for action. The country's 1988 constitution set aside 4 percent of Brazil's Gross National Product, or $14 billion, for education. The government plans to build 700 new, low-cost prefabricated schools next year and remodel existing ones.