Cook the pasta according to package direction. Drain and rinse under cold water.
In a large skillet over medium heat, add the butter onions. Cook for 1 minute and had the sliced mushrooms ham and peas. Stir until the onions and mushrooms are soft, around 10 minutes.. Season with salt, pepper and nutmeg. Set aside and let cool.
In a large bowl add the ricotta, egg, parmesan cheese, mozzarella cheese, salt and pepper, nutmeg. Mix well and add the onion mushroom mixture. Taste, correct seasoning if needed.
In a large heavy bottom pan over medium heat melt butter and add the flour. With a whisk mix well until a thick cram is formed. Add slowly the milk constantly whisking making sure no lumps is formed. Add more milk as the sauce thickens. Add salt, pepper and grated nutmeg as needed. The sauce should leave a thin layer of sauce on the back of a wooden spoon when it is ready.
In a large baking dish, smear some butter on the bottom of the dish. Stuff each shell with the onion mushroom mixture. Sprinkle more cheese over it if wish. Cover with the besciamella cream. Cook in the hot oven for 30 minutes. Serve hot.