Preheat oven to 400 F.
Heat oil in heavy-bottomed sauté pan. Put in onion and cook until translucent, but not browned.
Remove with slotted spoon and set aside.
Sauté squash slices in batches so the pan does not get overcrowded, just until slightly tender, but never soft. Stir in garlic, tomato, chilies, corn and cheese. Stir to combine well.
,br>Pour mixture in buttered 1-quart casserole and bake in preheated 400 F oven for 20 minutes.