Preheat the oven to 375 degrees F (190 degrees C). Lightly grease a 3-quart casserole dish.
Heat 2 tablespoons oil in a large, nonstick skillet over medium heat. Add leeks and onion to the hot skillet and saute for 10 minutes. Add mushrooms and continue to saute until leeks and onion are tender, 6 to 8 more minutes.
Meanwhile, cut zucchini, yellow squash, and Roma tomatoes into 1/4-inch slices.
Transfer mushroom mixture to the prepared casserole dish and spread evenly over the bottom. Layer zucchini, yellow squash, and tomatoes on top of the onion mixture.
Combine bread crumbs, Parmesan cheese, parsley, cashews, tarragon, salt, and pepper in a large mixing bowl. Sprinkle over the vegetables to cover.
Bake in the preheated oven until gratin is dark brown all over, about 1 hour.