1) Piaz dagh is a staple in any Persian dish... In fact I don't know any recipe that doesn't have piaz dagh. At its core, it's caramelized and browned onions using oil. We prefer olive oil but also being judicious in how much oil is used. For a healthier approach, start by letting the onions cook alone before adding oil.
2) You will get a much more attractive outer crust if you preheat your casserole dish prior to pouring in the egg mixture. Before pouring the mixture in, put the dish in the preheated oven for ~5 minutes to warm it up. Lining the dish with olive oil also is very helpful.