Begin heating a large pot of water for the pasta.
Meanwhile, heat the olive oil over medium-high heat in a wide, heavy skillet. Add the summer squash. Cook, stirring, until the squash begins to color, 3 to 5 minutes. Season with salt, and add the garlic. Stir until fragrant, just a few seconds, and add the tomatoes and a pinch of sugar. Cook, stirring often, until the tomatoes have cooked down and smell fragrant, 5 to 8 minutes. Stir in the corn, beans and bean broth or water, and season to taste with salt and pepper. Turn the heat to medium-low and simmer for 5 minutes. Stir in the basil, and keep warm.
When the water comes to a boil, salt generously and add the pasta. Boil, following the timing directions on the package but checking a minute before the indicated time. When the pasta is cooked al dente, remove 1/2 cup of the cooking water, then drain the pasta and toss with the vegetables and beans. If the vegetable-and-bean mixture seems dry, moisten with pasta water to taste. Add the cheese, if using, toss again and serve.
This recipe needs to be made in advance. From "A Crafty Lass," adapted from Food & Wine magazine.