How do I level areas of a wall that had peeling paint removed?
A skim coat of drywall mud ("joint compound" when you are shopping - "mud" to anyone that uses it, normally.) Fill with a small (not wide) knife first, let it dry, scrape or sand any high spots (leveling), fill again with a wider knife, dry, scrape or sand any high spots, fill again with a yet wider knife (4, 8, 12" is my usual progression of knife sizes.)

Don't overwork trying to get it perfect when wet. If it's imperfect in the low direction when dry and leveled, do another coat (and let it dry, and level it) until it's as perfect as you need it to be. Strong, glaring light from the side will help to spot imperfections.