Preheat oven to 375℉.
In a large pot or dutch oven, melt the butter and saute the shallots and garlic for about 1 minute, being careful not to burn them.
Add the ham and continue to saute for another minute.
Add the flour and stir to combine.
Add the milk, nutmeg, thyme, and cajun seasoning. Stirring well to combine.
Add the potatoes and mix all of the ingredients well. Remove from the heat and set aside.
Combine the shredded cheese into a large bowl and mix well.
Using a large springform pan placed on a baking sheet (this is very important because the pan will get very greasy due to the ham and cheese). Add the potato mixture into four layers. Between each layer of potatoes add 1/2 cup of the shredded cheese mixture. This will make you end with the cheese mixture on top.
Bake for 70 minutes or until the top is golden brown.
Remove from the oven and allow the galette to sit for 5-10 minutes. Remove from the springform pan and garnish with fresh thyme. Cut into wedges to serve.