The Parser code that handles special page transclusion flags the transcluded content as HTML. This prevents us from applying certain wikitext transformations to it, but not all of them. In particular, it is still subject to doBlockLevels.
Today I was experimenting with special page transclusion for T389892, and noticed something odd: the page uses a Mustache template indented with spaces. When this is added to the (transcluded) page output, the double-space indentation is therefore turned into <pre> tags in doBlockLevels. Note that this would apply to any piece of HTML indented with spaces, not necessarily mustache templates.
Now, obviously I can go and reindent the template. However, it seems odd to me that the Parser is applying these transformations to the HTML of a special page. The same HTML is (likely) used as-is on the special page itself, where it is already functional, and does not need additional transformations. Exactly two months ago, r1101112 introduced a new isRawHTML output mode for T381617. To me, it would make sense to switch special page transclusion to use that rather than isHTML, as that would prevent unwanted transformations. However, I imagine there might still be valid reasons to apply at least some of the transformation, and at the very least this would require a review of existing transcludable special pages (thankfully there aren't too many).