Make the cheese sauce- Melt the butter in a small saucepan over medium heat. Add in the flour and whisk to combine. Pour in the milk little by little, whisking after each addition. Bring to a simmer, whisking until the mixture thickens. Take the mixture off the heat and stir in the cheese. Season with salt, Set aside.
For the brunch cups- Use a rolling pin to roll out the puff pastry sheets until thin. Cut the pastry sheets into 9 equal squares. Line each well of a muffin tin with one puff pastry square, pressing it firmly to the bottom and sides. The edges should come just over the top of the muffin tin. Fill each cup with a spoonful of cheese sauce. Then, crack one egg into each cup and sprinkle diced ham on the top of each egg.