Preheat the broiler on high. Line a large baking sheet with aluminum foil.
Make the béchamel: In a medium saucepan, melt the butter over medium heat. Add the onion and sauté until translucent, a minute or two. Add the flour and cook for one minute, whisking constantly. Add the milk and keep whisking to break up any lumps, until the sauce bubbles and thickens, 3-4 minutes. Remove from heat and whisk in nutmeg and a pinch of salt and pepper. Whisk in a half cup of the cheese.
On the prepared baking sheet, toast the bread slices under the broiler on both sides until golden. Keep a close eye on them as they will burn quickly!
On two of the bread slices, spread a tablespoon of Dijon mustard. Slather with a thick layer of béchamel sauce. Add sliced ham and a half cup of cheese. Top with the two remaining bread slices to make two sandwiches. Transfer the sandwiches to the aluminum-lined baking sheet. Top the two sandwiches with the remaining béchamel and cheese.
Broil until the cheese is golden and bubbly, about 5 minutes.