Preheat the oven to 350 degrees. Coat a small ramekin with cooking spray.
Heat a small skillet over medium heat and coat it with cooking spray. Add the onion and mushroom then cook, stirring often, for 4-5 minutes, or until tender and lightly caramelized; add the ham and cook, stirring often, for a minute.
Place most of the mushroom mixture into the ramekin along with half of the cheese. Crack an egg into the ramekin, being careful not to break the yolk. Add the milk and remaining mushroom mixture and cheese to the top. Season with sea salt and freshly cracked pepper, to taste.
Place onto a baking tray and cook for 5 minutes; Turn the oven to broil and cook for another 4-5 minutes or until the whites are set but the yolk remains soft. Remove from the oven and serve immediately. Enjoy.