In a medium bowl, whisk together the flour, baking powder, salt, nutmeg, and cinnamon. Set aside.
In a large mixing bowl, beat the softened butter, granulated sugar, and brown sugar until light and creamy, about 2 to 3 minutes.
Beat in the egg yolks, vanilla extract, and rum extract until combined.
Mix in the eggnog.
Add the dry ingredients to the wet ingredients and mix just until a soft cookie dough forms. Do not overmix.
Cover the dough and refrigerate for about 30 minutes.
Preheat the oven to 350°F.
Line baking sheets with parchment paper.
Scoop the chilled dough into 1 ½ tablespoon portions and place them about 2 inches apart on the prepared baking sheets.
Bake for 10 to 12 minutes, or until the edges are set and the centers still look slightly soft.
Let the cookies cool on the baking sheet for about 5 minutes.
Transfer the cookies to a wire rack and cool completely.
To make the frosting, beat the softened cream cheese and butter together until smooth and creamy.
Add 2 cups of powdered sugar and beat until combined.
Add 1 tablespoon of eggnog, rum extract if using, nutmeg, and salt.
Beat until smooth and fluffy.
Add more powdered sugar for a thicker frosting or a little more eggnog if needed for spreading.
Spread or pipe the frosting over the completely cooled cookies. If piping, start in the center of each cookie and work outward in a circular motion until you reach the edges. Finish each cookie with a light sprinkle of ground nutmeg.
Sprinkle each cookie lightly with ground nutmeg.