Bring a large covered saucepot of salted water to a boil. Add the pasta and cook according to package instructions.
Meanwhile, heat the olive oil in a 12-inch skillet over medium heat. Add the onions and cook until beginning to soften, about 3 minutes. Increase the heat to medium-high and stir in the mushrooms. Cook, stirring frequently, until the mushrooms are golden and most of the liquid has evaporated, 8 to 10 minutes. Transfer the mushroom mixture to a small bowl.
In a 2-cup liquid measuring cup, whisk the cornstarch into the milk. Add to the same skillet and heat to boiling over medium heat, whisking frequently. Boil 1 minute, stirring constantly to prevent scorching. Remove the skillet from the heat and whisk in the Parmesan, 1/4 teaspoon salt and the pepper.
Place the peas in a colander. Pour the pasta over the peas. Drain and return to the saucepot. Stir in the mushroom mixture, cheese sauce and ham; toss to coat. Serve with freshly grated Parmesan.