Cook ziti according to package directions; drain. Set aside.
Preheat oven to 375º F.
Heat oil in a large nonstick skillet over medium-high heat.
Add onion; cook, stirring frequently, for 4 to 6 minutes, or until onion is translucent.
Add garlic; cook, stirring frequently, for 1 minute.
Add tomatoes, summer squash, and zucchini; cook, stirring frequently, for 3 to 4 minutes.
Combine onion mixture, pasta, basil, salt, pepper, red pepper flakes (if desired), ½ cup mozzarella cheese, Parmesan cheese, and ricotta cheese in a large bowl; mix well. Place in a 2½ to 3-quart casserole that is lightly coated with spray.
Top evenly with remaining ¼ cup mozzarella cheese. Bake, covered with aluminum foil, for 35 minutes. Remove foil and bake an additional 10 minutes, or until cheese is bubbly.