Preheat the oven to 375 F (200 C) and brush generously the eggplant slices with olive oil, place them on a parchment-paper-lined baking dish and bake until golden and tender, about 20 minutes. Let cool and then chop them into about half-inch pieces.
In a large skillet sauté the onion in 2 tablespoons of olive oil, until soft. Remove with a slotted spoon and set aside. To the skillet add the pepper and sauté the pepper, remove when done, then add the squash and a little more olive oil and sauté on high heat, tossing often for 2-3 minutes, then reduce the heat, cover and continue cooking until soft, about 15-20 minutes. Cool in a colander to collect any excess oil.
In a large bowl mix the onions, eggplant, peppers, squash with the grated cheeses, the cumin and the walnuts. Add very little salt and plenty of pepper and toss well to mix.
Oil a pan or a cast iron skillet and lay 2 sheets of phyllo, brushing generously with olive oil and leaving the sheets hanging out of the pan. Add two more sheets of phyllo brushing with oil and then add the filling, spreading all over the pan and pressing to even it.
Fold the hanging phyllo, brushing with olive oil, to make a crown around the pan partly covering the filling.
Bake in the middle of the oven, reducing the temperature to 350F (180 C) for about 40 minutes or more, until the phyllo turns golden brown and the filling sizzles.
Let cool a little before cutting to serve. The pie can be eaten warm or at room temperature. It can also be frozen and reheated.
