Heat the olive oil in a wok over medium heat, add the onion and fry until soft and tender. Stir in the lamb and mushrooms; cook until the meat has browned, stirring occasionally to break up the meat. Pour in the tomato pasta sauce and bring to a simmer. Stir in the cooked pasta, then pour into an ovenproof baking dish.
Melt the butter in a small saucepan over low heat. Pour in the flour and mix well. Pour in the milk, increase the heat to medium and cook until thickened. Stir 1/4 cup of the thickened milk into the egg, about a tablespoon at a time, then pour the egg into the remaining sauce and whisk together. Spread this white sauce over the pasta and sprinkle with cheese.
Bake in preheated oven until browned and crispy, about 30 minutes.