After much experimentation I believe that the docs for NSExtensionServiceFinderPreviewIconName are just wrong, the images supplied should never be a template image because that always leads to incorrect rendering.
From my testing, it seems like the only way to achieve correctly coloured icons is to supply an Image Set in your asset bundle that contains a 16x16px @1x bitmap image and a 32x32px @2x bitmap image.
If you supply a larger image, it is not scaled, but merely cropped.
If you supply an SVG image it will be rendered at some random scale, and multiple layers seem to be ignored
If you supply a template image (ie black only) it will be rendered as black and never treated like a proper template image
If you supply an SFSymbol name (system or custom) it will be rendered as black and never treated like a proper template image
The rabbit hole goes even deeper though because despite these images being limited to 32x32px, Apple's own images seem to be 64x64px and they render correctly, leading to wild visual inconsistency like that seen in the System Settings panel for enabling Finder Actions:
In that screenshot, "Compress" and "Extract" are mine, "Make Gif" and "Meme Maker" are 64x64px images from Shortcuts, "Remove Background" is from Pixelmator Pro, and the other three are from Apple's sample code for making Finder Actions.
I have yet to figure out how Pixelmator is able to supply an image larger than 32x32px.