"Microsoft will let customers have an on-premises Exchange licence for free if this scenario applies."
It's a while since I checked, but so far as I am aware this only applies to Exchange 2016, not 2019, so if you want to use 2019 then you need to buy a license for it. Also, if you use 2016 then you are also stuck with Windows Server 2016 as the host OS, because Exchange 2019 requires Windows Server 2019.
In addition, Exchange 2019 has a ridiculously high RAM requirement (128GB).
For that reason we still have our Exchange server (which doesn't host the mailboxes - they are all on 365) on the 2016 versions of both, despute having upgraded nearly all other VMs to 2019 now.
I expect that various bodges might work such as unsupported OS / Exchange version combinations, and lower than the official minimum of RAM, but we don't really want to risk it with something like this, given that if there are problems the response from Microsoft is likely to be to point out that it's an unsupported configuration.
The whole hybrid AD / Exchange is an absolute mess - some things have to be configured in local AD, some in the 365 admin portal, some in local Exchange, some in 365 Exchange. Plus Azure AD connect, and Intune Connector (if you use Intune) have to be set up and kept an eye on. Why can't they come up with a unified, coherent management and syncing system for all of it? Far more worthwhile and useful than rounded window corners and default-centred taskbar icons...