- Preheat an oven to 400ºF.
- Bring a large pot of water to a boil over high heat. Generously salt the water, add the pasta and cook, stirring occasionally, until al dente, about 8 minutes. Drain the pasta and rinse under cold running water. Set aside.
- In a 12-inch nonstick fry pan over medium-high heat, warm 3 tablespoons of the olive oil. Add the corn, season with salt and black pepper and cook, stirring occasionally, until the corn is lightly golden, 6 to 8 minutes. Transfer to a large bowl. Set aside.
- Set the pan over medium-low heat. Add the onion, 1 teaspoon salt and black pepper, to taste. Cook, stirring occasionally, until the onion is translucent, about 2 minutes.
- Stir in the tomatoes, garlic, oregano and red pepper flakes and cook, stirring occasionally, until the tomatoes soften and begin to form a sauce, about 5 minutes.
- Stir in the tomato paste and cook for 1 minute. Add the wine and cook until the wine has reduced and the sauce is fairly thick, about 3 minutes more.
- Add the pasta, tomato sauce, basil, mozzarella and half of the Parmigiano-Reggiano to the bowl with the vegetables and stir to combine.
- Transfer to the fry pan and sprinkle the remaining Parmigiano-Reggiano on top. Transfer the pan to the oven and bake until golden brown on top, 20 to 25 minutes. Serve warm.