Custom headers are not compatible with Netlify’s built-in asset optimization. Assets optimized with that feature will not have custom headers applied. You can Disable asset optimization in Site settings > Build & deploy > Post processing > Asset optimization.
Checking one of my sites that has pretty URLs enabled, visiting a URL ending in .html (e.g.https://example.com/somepage.html) doesn’t strip the .html (e.g.https://example.com/somepage), so perhaps pretty URLs aren’t working as intended.
I never use a .html extension in links either internally or externally, so I don’t see it as a major issue (for me.)
I think a lot of the confusion comes from Rewrite being an overloaded term.
Those having been doing development for many years associate it with server level rewrites/redirects as performed by Apache or IIS.
Netlify uses it both in their Redirects and rewrites documentation in the more traditional sense, but also in various places concerning the Pretty URLs feature to mean rewriting the content of your html file.