Preheat oven to 350F. Heat the olive oil in a large frypan and saute the onion and garlic until almost brown.
Salt and pepper to taste while cooking. If the zucchini and squash are large, cut the slices in half or quarters Add the zucchini, summer squash, and the corn. Cook until half done. Stir in the green chilies.
Spray a 9x13" pan with cooking spray. Spoon the mixture into the pan. Top with the grated cheese. Bake for 30-35 min.