With PostgreSQL 17 installed in unattended mode, you need to use the following argument in your command line:
--superpassword my-password
This way this password is set.