Place the softened unsalted butter, granulated sugar, and packed brown sugar in a large mixing bowl. Beat with a hand mixer until the mixture becomes pale, airy, and fluffy.
Pour in the vanilla extract and add the egg. Continue mixing until both ingredients are fully incorporated. Scrape the sides and bottom of the bowl as necessary to ensure the mixture is uniform.
Gradually add the all-purpose flour, cornstarch, baking soda, and salt to the wet mixture. Blend on low speed just until a soft, dense dough develops.
Carefully fold the chopped candy corn into the dough until the pieces are evenly dispersed. Cover the bowl securely with plastic wrap and refrigerate the dough for no less than 1 hour.
Preheat the oven to 350°F. Lightly coat a cookie sheet with nonstick cooking spray.
Scoop out heaping tablespoons of chilled dough and roll each portion into a ball. Arrange the dough balls approximately 1 inch apart on the prepared baking sheet.
Inspect each portion before baking. No candy corn should remain exposed along the bottom or sides of the dough balls. Cover any visible pieces with a small amount of dough to reduce the chance of melted candy escaping onto the pan.
Bake the cookies for 8–10 minutes. Remove them from the oven while the centers still appear slightly underdone. Avoid extending the baking time, as the cookies will continue to firm on the hot baking sheet.
Leave the cookies on the baking sheet for at least 10 minutes. This resting period allows them to set properly and makes them easier to lift from the pan.