Preheat oven to 350°F.
Add diced potatoes to a large pot and cover with water. Bring to a boil over high heat, then reduce the heat to medium-high and continue boiling until the potatoes are softened, about 5-8 minutes.
In a large oven-safe skillet over medium heat, melt the butter. Add the diced onion and cook, stirring frequently, until softened, about 5 minutes.
Add the garlic and cook for 1 more minute. Sprinkle the flour over the onion and garlic, and whisk to form a paste. Cook for 1 more minute.
Gradually whisk in the milk. Add the salt, pepper, mustard powder, and cayenne, continuing to whisk. Bring the mixture to a simmer. Then, reduce heat to low and continue cooking, stirring frequently, until thickened, about 5 minutes.
Stir in the sour cream.
Gently fold in the ham and potatoes, stirring until evenly coated.
Sprinkle the cheddar and Monterey Jack cheese evenly over the top.
Bake for 20- 25 minutes, or until the potatoes are fork-tender and the cheese is melted.
Increase the heat to broil and cook for 30-60 seconds to lightly brown the cheese. Keep a close eye on it, as it can brown quickly!
Allow the dish to rest for a few minutes before garnishing with chives and serving. Add salt to taste.