Cook the spaghetti in a large pot of salted water until al dente. Drain, reserving some pasta water, and set aside. Heat the olive oil in a large skillet over high heat. Add the corn and cook until slightly charred, about 5 minutes. Lower the heat and add the spinach and garlic. Toss to combine and cook until spinach is just wilted. Remove from the heat and stir in the tomatoes. Season with salt and pepper. Add the spaghetti and toss thoroughly with tongs. Add a splash of pasta water and Parmesan and toss again to combine. Add a bit of olive oil if needed and red pepper flakes if desired. Serve with additional Parmesan for grating.
Recipe by Katherine Martinelli at http://www.katherinemartinelli.com/blog/2011/my-summer-vacation-and-a-summer-pasta-recipe/