Preheat your oven to 350º F. Melt 2 tablespoons of butter in a medium skillet over medium-low heat. Cook sliced squash and onions in the melted butter until they're tender.
In a large bowl, lightly whisk the eggs. Add cheese and milk to the eggs, whisking until everything is well combined. Mix the cooked squash and onions into the egg mixture, stirring well.
Melt the remaining 2 tablespoons of butter in the skillet you used for squash and onions, then add it to the squash casserole mixture.
If you like a little kick, throw in some cayenne pepper, salt, and pepper. Give it a good stir.
Pour the squash casserole mixture into the dish, top it evenly with crushed Ritz crackers, and bake in the preheated oven for about 45 minutes, until the top is golden brown and the casserole doesn't jiggle when you move the dish.