The samba background daemon doesn't refresh the printcap cache on startup. It only refreshes it after the 'printcap cache time' elapsed. So you have to wait 5 minutes before spoolssd is able to find printers, but till then the process is already killed again ...
lpadmin -p testprinter -E -v /dev/null
smbpasswd -a root
lpstat -l -p testprinter
rpcclient -Uroot localhost -c 'getprinter testprinter 2'
This bug was referenced in samba master:
Created attachment 17320 [details]
patch for 4.16
Re-assigning to Jule for inclusion in 4.16.next.
Pushed to autobuild-v4-16-test.
This bug was referenced in samba v4-16-test:
Closing out bug report.
This bug was referenced in samba v4-16-stable (Release samba-4.16.2):