Caramelize the onions: Add 2 tablespoons of butter to a medium skillet over medium-low heat. Once the butter has fully melted and begins to foam, add finely chopped onions. Season with a pinch of salt and black pepper, then cook, stirring occasionally, until the onions turn a medium amber color and smell sweet, about 10 to 15 minutes. Transfer the onions to a plate and set aside.
Cook the Tomato: To the same skillet, add 1 tablespoon of butter. Once melted and slightly sizzling, add chopped tomatoes. Sauté, stirring occasionally, until the tomatoes soften and release their juices, then cook until the juices evaporate completely and the tomato pieces darken slightly, about 5 minutes. Transfer the tomatoes to the plate with the onions.
Sauté the Potatoes: Return the same skillet to the heat and add 2-3 tablespoons of butter. Once melted and foaming, add chopped or diced potatoes. Cook, stirring occasionally, until the potatoes are light golden brown and tender, about 10 to 12 minutes. Turn off the heat and set aside to cool slightly.
Whisk the Eggs: In a large mixing bowl, crack 6 eggs. Add milk, salt, pepper, and spices. Whisk vigorously for at least 5 minutes, until the mixture becomes frothy and pale yellow—this helps incorporate air for a light, fluffy texture. Gently stir in the flour and baking powder. Use a spatula to combine the dry ingredients into the egg mixture. Once the dry ingredients totally disappear, stir in the finely chopped aromatic herbs, caramelized onions, sautéed vegetables, pickled olives and sun dried tomatoes, if using.
Bake the Egga: Preheat the oven to 375°F (190°C). Pour the egg mixture into a baking dish. Bake until the tops are set, lightly golden, and a toothpick or knife inserted into the center comes out clean. Baking time depends on the shape and depth of the baking dish (see notes).
Serve the Egga: Serve egga with hot “aish baladi” (Egyptian whole wheat pita bread) or hot pita bread and pickles on the side.