Begin by bringing a large pot of salted water to a boil. Add the uncooked penne pasta and cook according to package instructions until al dente. Once cooked, reserve a cup of pasta water for later use, then drain the pasta in a colander and set it aside.
In a large skillet, melt 2 tablespoons of the unsalted butter over medium heat. Add the sliced shallots (or green onions) and sauté for about 2-3 minutes until they become translucent. Stir in the minced garlic and cook for an additional minute, being careful not to let it burn.
Next, add the finely chopped broccoli and sliced red pepper to the skillet. Season with salt and pepper to taste. Sauté for about 5-7 minutes until the vegetables are tender but still vibrant in color.
Stir in the cream-style sweet corn, frozen corn, and grated carrot. Mix well and allow the mixture to cook for another 3-4 minutes, stirring occasionally. If the mixture seems too thick, add a splash of the reserved pasta water to achieve your desired consistency.
Add the cooked penne pasta to the skillet, tossing to combine all the ingredients. Melt in the remaining 2 tablespoons of butter and sprinkle with grated Parmesan cheese. Stir until the cheese has melted and everything is well-coated.
Remove the skillet from heat and fold in the chopped fresh basil. If you like a bit of heat, now is the time to sprinkle in some red pepper flakes. Serve hot, garnished with extra Parmesan cheese if desired.