Preheat oven to 350 degrees F (175 degrees C). Grease an 8x8-inch baking dish.
Heat butter and olive oil in a skillet over medium-high heat; cook and stir onion in the heated butter-olive oil until onions soften, about 10 minutes. Transfer onion to a plate to cool.
Whisk cream, eggs, salt, and black pepper in a bowl; stir in mozzarella cheese, Parmesan cheese, and onion. Pour mixture into the prepared baking dish.
Bake in the preheated oven until eggs are set and a knife inserted in the center comes out clean, about 35 minutes.