Heat the oven to 425°F / 220°C. Line a 12-cup muffin tin with paper liners.
Make the filling: beat the cream cheese, sugar, egg yolk and vanilla until completely smooth. Set aside and keep it cool while you mix the batter.
Whisk the flour, baking soda, baking powder, pumpkin pie spice, cinnamon and salt together in a large bowl.
In a second bowl, whisk the pumpkin puree, both sugars, eggs, oil, milk and vanilla until smooth. Pour into the dry ingredients and fold until just combined — a few small lumps are fine, and overmixing makes muffins tough.
Spoon batter into the liners, filling each about 2/3 full. Push a spoonful (about 1 tbsp) of cream cheese filling into the centre of each muffin, then cover lightly with a little more batter if needed. Sprinkle with coarse sugar if using.
Bake at 425°F / 220°C for 5 minutes, then — without opening the oven door — reduce the heat to 350°F / 175°C and bake 13–17 minutes more (18–22 minutes total), until a toothpick inserted into the muffin edge, not the filling, comes out clean.
Cool in the tin for 10 minutes, then move to a rack. The filling firms up as the muffins cool.