Heat oil in a wide pan and add cubed chicken. Season with salt and pepper. Cook till it's done. Remove from the pan and slice them. Keep it aside.
In the same add 1-2 tsp oil and cook mushroom with salt and pepper. When mushroom is almost done, add spinach leaves (if using). Cook till leaves are wilted and water is dried.
Add butter to the same pan and melt it. Add minced garlic and cook for 2-3 mins, till the raw smell goes. Add plain flour and mix well. Keep stirring and cook till the roasted smell comes 4-5 mins. While stirring, add water-milk mixture gradually. Keep on stirring, till the sauce becomes thick. The sauce should have a smooth consistency, without any lumps. Add chopped parsley and pepper & salt (if using unsalted butter).
Lightly grease a baking dish, you can use an 8 inch, deep baking dish. Pour half of the white sauce on the bottom. Place cooked chicken on top of the white sauce.
Layer sliced boiled eggs on top of the chicken. Layer mushroom and spinach (if using) on top of the boiled eggs. Spread the mashed potato on top of the mushroom and spinach. Pour the remaining white sauce on top of the mashed potato.
Sprinkle grated cheese as the final layer. Bake in the preheated oven for 25- 30 mins. The cheese should be melted and bubbly. For the last 5 mins, you can use the broiler for the cheese to melt.
Notes
Let the pie rest for 20-25 mins before serving. The above qty will serve 4-6 persons. If you prefer a thicker layer, use more potato.