Preheat the oven to 350 degrees F.
Whisk together the flour, cocoa powder, baking soda, ground ginger, cinnamon, salt, mustard powders, pepper and nutmeg in a large bowl. Beat the butter and sugar in a separate bowl with an electric mixer on high until light and fluffy. Add the molasses, vanilla and egg and mix on low to completely combine. Stir in the flour mixture and scrape the bottom of the bowl to release any floury bits. Stir together.
Divide the batter into four smaller pieces, wrap in plastic wrap and refrigerate until completely firm, about 1 hour.
Shape the dough into balls using a heaping tablespoon of dough for each. Place them on cookie sheets leaving 2 inches between each. Bake until set and puffed, 8 to 10 minutes.
While the cookies bake, beat together the cream cheese, butter, confectioners' sugar and vanilla in a bowl with an electric mixer until smooth and creamy. Taste and add more sugar if desired to your desired sweetness.
Cool the cookies completely on a wire rack. When cool, flip half of them over. Divide the frosting evenly among half the whoopie pies. Sandwich together with the other halves. Store at room temperature for up to 1 day or in the fridge, in layers divided by wax paper, for up to 5 days.