Heat oven to 400° F. Butter a 9-by-13-inch cake pan; dust with flour.
Whisk the flour, cornmeal, sugar, baking powder, baking soda, salt, and cayenne in a bowl. In a separate bowl, whisk the butter, buttermilk, and eggs, then stir in the cheese. Stir the wet ingredients into the dry ingredients until combined. Spread evenly in the prepared pan.
Bake until a toothpick inserted in the center comes out clean, 35 to 40 minutes. Cool in the pan until warm. Cut into squares.