This Time of Darkness by Helen Mary Hoover
The only thing that doesn't fit is that the boy is called Axel, not Michael. EDIT: in fact it turns out at the end that his real name is Michael, so it fits perfectly (thanks to Buzz for telling me this).
From Goodreads:
Eleven-year-old Amy lives in a decaying underground city. Ignored by her mother and under surveillance by authorities because she can read, Amy reluctantly finds herself befriending Axel, a strange boy who claims to have come from a mythical place called Outside.
Quoting from some of the reviews there (emphasis mine):
Using characters' own observations and vivid memories, Hoover paints a picture of a cramped, stifling, stinking city where children are taught by computer in classrooms that hold a thousand students, where 15-year-olds get pregnant to earn an "apartment"--a 15-by-15 room--of their own, where the few open spaces have steadily been filled in to house the relentlessly growing population, where there are no jobs but factory labor, and where no one learns to read. The 11-year-old heroine, Amy, is already under pressure from her mother to move out to the dormitories so her mother can have more space and privacy. As a kid in the 80's, I'd never seen anything like it.
and
This Time Of Darkness is about a young girl named Amy who lives in an enormous city of the far future, who has never seen the outside world. She has learned about it by teaching herself to read. One day, a boy named Axel reveals to her that not only has he seen the outside, but that he is from there. And so they decide to escape.
See also the following two previous questions which turned out to be this book: