Using a food processor, mix the the flour, sugar, salt and black pepper for a few seconds to mix. Add the butter and pulse until blended, then add the Cheddar cheese and Parmesan, and pulse until the dough comes together. Shape the dough into one log, wrap in plastic and chill until firm, at least an hour.
Preheat the oven to 350 °F and line 2 baking sheets with parchment paper. Slice the dough disks about ¼-inch thick and place on baking sheets, 1/2 inch apart. Bake for 15-18 minutes until the shortbread are lightly browned on the bottom. Cool the cookies on the tray before removing.