That message is normally displayed by Shim when the system is configured with Secure Boot disabled. I seem to recall it being displayed in error on at least one system, but I don't recall the details. If this is what's happening, you won't get rid of the message, so you should simply learn to live with it -- at least, unless and until an updated Shim binary is released that fixes the problem.
You may want to check your Secure Boot mode in Ubuntu, though. You can do so as follows:
$ hexdump /sys/firmware/efi/efivars/SecureBoot-8be4df61-93ca-11d2-aa0d-00e098032b8c
0000000 0016 0000 0001
The first line of output shows the value of the EFI's
SecureBoot variable. In this case, it ends in
0001, which indicates Secure Boot is active. If it reads
0000 instead, that means it's inactive. If you get a
No such file or directory error, that means that the system doesn't support Secure Boot at all (or maybe that it's supported but has never been active), which is effectively the same as it being inactive.
If the firmware's own UI says that Secure Boot is active but it's inactive in Ubuntu, then that suggests a problem somewhere. I know some recent versions of Shim have a way of effectively bypassing Secure Boot if they're configured in a certain way, so that might be what's going on; but I'd need to dig a little deeper to figure out what that feature is or how to check or reconfigure it.