Combine the goat cheese and cream cheese in the bowl of a mixer, and mix until fluffy.
Add the eggs, one at a time, while the mixer is running. Wait until the mixture is smooth before adding the next egg. Scrape down the sides of the bowl as you go.
Gradually add the buttermilk, mustard, salt, and cayenne, and mix till completely blended.
Remove the bowl from the mixer. Fold in the ham, and then add the flour. Mix the flour in with a wooden spoon to make what will be a very wet dough.
Spoon the dough into buttered muffin tins, filling to just below the top. Or put the dough into a buttered 9"x5"x3" loaf pan.
Bake the muffins at 400 degrees for 30 minutes, or until puffed and brown. If making a loaf, lower the heat to 350 degrees and bake for one hour.
Let the loaf cool completely before attempting to slice. Refrigerate or freeze any unused part of the loaf.