Preheat the oven to 350 degrees. Coat a 2-quart baking dish with butter and set aside.
Heat a layer of olive oil in a large nonstick skillet over medium-high heat. Add mushrooms, season lightly with salt and pepper, and cook stirring frequently until browned and liquid has evaporated, about 10 minutes Add the onions, season with a little more salt and pepper, and cook stirring frequently until the onions are softened, about 5 more minutes. Reduce heat slightly, add the sour cream, and let the mixture bubble away about 5 to 10 more minutes, stirring frequently, until it is very thick. Remove from heat.
In a large bowl, lightly beat the eggs. Stir in the cottage cheese, mushroom soup mix, 1 cup of the cheddar cheese, and 1 tablespoon of the Parmesan. Fold in the mushroom mixture. Transfer to the prepared baking dish, smooth the top, and sprinkle with the remaining cheddar and Parmesan cheeses. Transfer to the oven and bake about 30 minutes, until hot and bubbly and just starting to brown at the edges.
Remove from oven and let rest about 10 minutes before cutting into squares and serving.