Bring a large pot of water to a boil. Salt the water and add the spaghetti.
Heat the olive oil in a large straight-sided pan over medium-high heat. Add the corn, zucchini, garlic and red pepper flakes and saute, stirring occasionally, until the zucchini is tender but not browned, 4 to 6 minutes.
When the spaghetti is al dente, drain and add to the zucchini. Turn off the heat and toss lightly. Add the tomatoes, walnuts and half the Parmesan. Drizzle with olive oil and gently mix together. Garnish with basil and additional Parmesan. Divide the pasta among bowls and serve.