Place a rack in middle of oven; preheat to 350°. Lightly coat a 9"-diameter cake pan or 8x8" baking pan with nonstick vegetable oil spray; line with a parchment paper round if using a cake pan or a sheet of parchment if using a square pan.
Whisk together 1½ cups (300 g) granulated sugar, 1⅓ cups (167 g) all-purpose flour, ½ cup (57 g) Dutch-process cocoa powder, 2 tsp. Diamond Crystal or 1¼ tsp. Morton kosher salt, and ¾ tsp. baking soda in a large bowl.
Add 2 large eggs, ½ cup buttermilk, ½ cup extra-virgin olive oil, 1 Tbsp. vanilla extract, and ¾ cup water and whisk until no pockets of unincorporated flour or cocoa powder remain.
Scrape batter into prepared pan and bake cake, rotating pan halfway through, until a tester inserted into the center comes out with just a few moist crumbs attached, 38–45 minutes.
Transfer pan to a wire rack and let cake cool in pan 15 minutes. Turn out cake onto rack and let cool completely.
Microwave 6 oz. unsweetened chocolate, chopped, ¼ cup extra-virgin olive oil, 1 Tbsp. vanilla extract, ¾ tsp. Diamond Crystal or ½ tsp. Morton kosher salt, and ½ cup water in a large microwave-safe bowl in 20-second bursts, stirring after each burst, until chocolate is melted.
Vigorously whisk mixture until mostly smooth; mixture will look oily and broken, but that is okay.
Add 2 cups (220 g) powdered sugar and whisk until dissolved and mixture is completely smooth.
Chill, stirring with a rubber spatula every 5 minutes to promote even cooling, until frosting is room temperature and looks like soft fudge, about 20 minutes.
Place cake, upside down, on a cake stand or large plate. Spoon frosting on top and spread with a spoon or offset spatula to create dramatic swooshes; sprinkle with flaky sea salt.
To serve, cut into individual slices and drizzle with oil if desired.
