Preheat oven to 375°F.
Melt unsalted butter in a large saucepan over medium heat. Whisk in flour, ground mustard powder, white pepper, and Kosher salt. Then, pour in room-temperature whole milk, about a cup at a time, whisking well after each addition, to ensure the mixture is smooth. Cook for a few minutes, whisking occasionally, until the sauce thickens. Make sure the sauce does not boil.
Next, add six ounces of extra-sharp cheddar cheese and six ounces of white cheddar cheese by the handful, whisking well after each addition until each batch of cheese is melted and incorporated into the sauce. Keep the sauce warm over low heat while cooking the pasta. Do not allow it to boil; whisk it occasionally.
Cook pasta according to package directions minus two minutes from al dente. When there is about a minute left on the cooking time, reserve half a cup of the pasta water. Then, drain the pasta in a colander set in your kitchen sink.
Whisk the reserved pasta water into the cheese sauce.
Combine the cooked pasta and 8 ounces of diced ham in a large bowl, or you can use the same pot you cooked the pasta in. Then, pour in the cheese sauce. Use a large silicone spatula or wooden spoon to combine everything.
Spray a large 9x13 baking dish with non-stick cooking spray. Transfer the pasta mixture to the prepared pan. In a small bowl, combine the remaining two ounces of each cheese and two ounces of diced ham, then sprinkle over the top of the casserole.
Bake in a 375°F oven for 30 minutes. Remove from the oven and allow to cool for about five minutes before serving.
Yield 8 servings