You can either put the potatoes into a pan with water and boil until tender of if you want to get done quicker put into a big enough microwave safe bowl and nuke them until tender. (you can start the roux while you wait for the potatoes to get done)
Drain the potatoes but save about a cup of liquid.
Melt butter in a pan and add diced onion. Cook until translucent.
Add flour to your pan with onions and at this point you can add the pepper flakes or ground pepper (or both) and cook for about 3 or 4 minutes to cook out the flour.
Add your 2 cups of broth and your milk to pan whisking so you dont get lumps.
When it starts to thicken you can add the cheese, potatoes and ham. (if it gets to thick for you add some or all of your reserved liquid from the potatoes)
Simmer over low heat for about 30 minutes stirring frequently.