Preheat the oven to 350°F (175°C). Line an 8x8-inch baking pan with aluminum foil, letting the foil extend over the edges for easy removal, then spray the foil with cooking spray; set the pan aside.
If your butter is not already melted, place the ½ cup (1 stick) unsalted butter in a microwave-safe bowl and microwave until melted, about 1 minute. Let the melted butter cool until warm but not hot (about 1–2 minutes) so it won’t scramble the egg.
Add the 1 large egg, ¾ cup light brown sugar (packed), ¼ cup granulated sugar, and 1 tablespoon vanilla extract to the warm melted butter. Stir vigorously until the mixture is smooth and well combined, about 1 minute.
Stir in the heaping ½ cup creamy peanut butter (store-bought, e.g., Jif or Skippy) until evenly incorporated.
In the same bowl, add 1 ¼ cups all-purpose flour, ½ teaspoon baking soda, and a pinch of salt if using. Fold and stir just until the dry ingredients are incorporated—do not overmix.
Fold in the 6 ½ ounces roughly chopped dark or semi-sweet chocolate until distributed throughout the batter.
Turn the batter into the prepared 8x8 pan and spread it evenly, smoothing the top lightly with a spatula.
Bake in the preheated oven for 18 to 22 minutes, until the center is just set and the top is lightly golden. A toothpick inserted into the center should come out with few crumbs; it may pick up melted chocolate if it hits a chunk.
Remove the pan from the oven and allow the bars to cool completely in the pan for at least 30 minutes; they will firm up as they cool.
Use the foil overhang to lift the bars from the pan, transfer to a cutting board, and slice into squares. Store extra bars in an airtight container at room temperature for up to 1 week or in the freezer for up to 3 months.