That error message can be misleading sometimes, a couple of important things to check:
The cert can’t be self-signed, it must be issued by a public or private CA.
The cert’s subject name needs to match exactly what you defined in your XML profile <HostAddress>vpn.blah.com</HostAddress>
If the IOS-XE running is older than 16.9.1, make sure you set the BypassDownloader to ‘true’ on your profile.
IOS-XE FlexVPN with Anyconnect