Preheat oven to 375°F. Spray 2-quart casserole dish with cooking spray and set aside. Heat oil in a large skillet over medium heat; add squash and onions and cook, stirring until squash is just tender, about 10-12 minutes. Add spinach to skillet of squash mixture; stir in thyme and wine. Cook, stirring for 2-3 minutes, until most of the liquid has evaporated. Remove from heat and set aside.
In a large bowl, whisk eggs and add milk, salt and pepper. Stir in bread and squash mixture; toss gently. Set aside for 10 minutes.
Transfer half of bread mixture to casserole dish; top with 1 cup cheese and remaining bread mixture. Bake for 30 minutes. Remove from oven and top with remaining cheese and bake for an additional 5-10 minutes or until center is set.