A draft specification exists specifically for this: Semantic Markdown.
An implementation of the draft spec is currently in development by me: sem-md, as a filter extension for Pandoc, usable also with the very nice Pandoc wrapper framework Quarto.
Currently, sem-md only suppresses annotations in output rendering (and currently doesn't even do that reliably, but works for some types of annotations) so is usable for writing some annotations that are kept with source but is hidden from output rendering.
It is planned to extend the filter extension to render metadata for the target document formats html (as RDFa) and PDF (as XMP, only document-wide at first).
Until sem-md has matured, I can recommend to use Markdown processors that support the header-attributes extension to the Markdown language, and then add tags using CSS classes or identifiers inside braces.