Bring a large pot of water to a boil and salt it. Put the oil in a large skillet over medium-high heat. When it's hot, add the onion and zucchini, sprinkle with salt and pepper, and stir occasionally until browned and tender, about 8 to 10 minutes. Add the tomatoes and cook, stirring occasionally, until softened, about 10 minutes more.
Add pasta to boiling water and prepare as directed. When the pasta is done, drain it and toss with the onion and zucchini mixture and the Parmesan. Taste and adjust the seasoning, garnish with basil if you like, and serve.