Preheat your oven to 400°F (200°C) and line a baking sheet with parchment paper.
In a large bowl, whisk together the flour, baking powder, salt, and black pepper.
Add the softened butter to the dry ingredients and mix until crumbly.
Stir in the shredded cheddar cheese, diced ham, and chopped spinach until evenly combined.
Gradually add the milk, mixing until a soft dough forms. If the dough is too sticky, add a little more flour.
Turn the dough out onto a floured surface and knead gently for about 1 minute.
Roll the dough into a rectangle about 1/2 inch thick. Cut into strips approximately 1 inch wide and 4 inches long.
Place the strips on the prepared baking sheet. Brush the tops with the beaten egg for a golden finish.
Bake for 15-20 minutes, or until the sticks are golden brown and cooked through.
Allow to cool slightly before serving.