Yes I agree with that. You have missing quotes BTW which is breaking the highlighting.
The HTML approach above is a more complete example but similar to my first answer on using Liquid variables in H1/# and H2/##. So you can use markdown or html as you need to for changing heading level and Liquid to insert values.
My desire to do this is definitely informed by wanting my output to be semantic HTML, not about the styling of the various header styles.
So, given that, the issue is that the content has Markdown in it that translates to h2s, e.g. ## My subheading. This markup is appropriate when the content appears as its own page, but is not correct when it’s embedded in other content. If the headings were part of the front matter, it would be easy to reconfigure via Liquid variables, but they’re within the content. @printf’s solution of using a wrapping article element may be the cleanest way to go. I just saw the header_offset setting and was hopeful it could be applied to individual pages or content (vs at the config.yml level).