Cook the pasta in heavily salted water according to the package directions. Rinse first with hot water, then with cold.
Heat 2 tablespoons olive oil in a large skillet over medium-high heat. Add the onion and cook until it starts to soften, about 3 minutes. Add the garlic, cook for 30 seconds then add the zucchini and corn kernels. Cook for about 5 minutes or until the vegetables are crisp tender.
Put the pasta in a large mixing bowl. Add the cooked vegetables, tomatoes, rinsed beans, salt, pepper, vinegar and remaining ¼ cup of olive oil. Toss well. Tear the basil leaves and add to the salad and toss again. Serve immediately or chilled.