I ran into the same issue when installing MAAS 3.4 and 3.5 using the maas-ansible-playbook repo.
To fix this I manually had to run the following on the region-controller node:
> sudo maas-region dbupgrade
Operations to perform:
Apply all migrations: auth, contenttypes, maasserver, metadataserver, piston3, sessions, sites
Running migrations:
No migrations to apply.
Running Temporal migrations:
Applied all migrations.
to perform the db migrations needed for the maas-temporal service to run.
There is a pending PR on that repo to fix this exact issue.