Preheat oven to 350°F. Prepare an 11- x 7-inch baking dish by lightly spraying with cooking spray.
Place 3 tablespoons of butter in a large skillet and heat over medium-high heat. Once melted add the yellow squash, onion and 1 teaspoon of salt and cook for 5-7 minutes until the squash has softened.
Pour squash and onion mixture into a strainer to remove any excess liquid.
In a large bowl combine the remaining 1 teaspoon of salt, eggs, sour cream, mayonnaise, 4 ounces of cheddar cheese, 4 ounces of Swiss cheese, black pepper, and 1 cup of crushed Ritz crackers. Stir together. Add the cooked squash and onions and gently toss the mixture together.
Spoon the mixture into the prepared dish and then sprinkle with the remaining crushed crackers followed by the remaining 4 ounces of shredded cheddar cheese.
Place in the oven and bake for 20-25 minutes or until the casserole is hot and bubbling and the topping is golden brown.
Once cooked remove from the oven and let cool for 10 minutes before serving.