Preheat oven to 350°F (176°C). Slice both avocados vertically within the skin. Remove the slices from the skin. Reserve half of the slices and leave them as they are, long and lean. Chop the other half into cubes and set aside.
Add the eggs to a medium bowl and beat them well. Add in milk, salt, pepper, and chili flakes, beating well. Sprinkle in half the cheese and give the whole thing a good stir.
Melt the butter in a 10-inch skillet (or comparably-sized stove-top and oven-safe pan) over medium heat. Add the shallots and cook until gently browned, stirring occasionally. Scatter the cubed avocados into the pan. Give the eggs one more good stir and then pour them into the pan as well. Heat over medium flame for 3 minutes, then arrange the avocado slices in a fan pattern on top of the eggs. Slide the skillet into the oven and cook for 30 minutes.
Remove skillet from oven and cover the top with the remaining cheese. Slide the skillet under the broiler for a few minutes to brown cheese. Serve hot.