Preheat oven to 400°F.
Place squashes, thyme, and capers in a 9-by-13-inch baking dish; drizzle with 2 tablespoons oil and season with salt and pepper. Toss to combine.
Season fish with salt and pepper; arrange over squashes. Top with tomatoes. Drizzle fish and tomatoes with remaining 1 tablespoon oil.
Cover with parchment-lined foil and bake 15 minutes.
Remove foil and continue to bake until fish is opaque and squashes are tender, about 10 minutes.
Serve with rice.
