Preheat oven to 375°. Grease a 2-quart baking dish with 1 tablespoon butter. Set aside. Melt remaining butter in a large saucepan over medium-high heat. Add flour and cook, while stirring gently, for 1 minute. Gradually whisk in milk and bring to a boil. Reduce heat to medium-low, add pepper to taste, and stir until thick. Remove pan from heat.

Gradually add 1 cup of the Cheddar cheese and all of the cream cheese, whisking until melted. Stir in cayenne pepper and nutmeg, then add macaroni and ham.

Transfer to prepared dish and sprinkle with remaining Cheddar cheese. Bake for 30 minutes or until top is golden and sauce is bubbling.