For the environment stanza settings, it only takes static values essentially;
The values set are taken as-is and not evaluated.
Hence, your $DB_PASSWORD env var is set to the literal string ${STAGING_DB_PASSWORD}.
You can take advantage of the $BASH_ENV env var to set up these env vars early into the job then.
Assuming you have $STAGING_DB_PASSWORD env var injected via project env vars or org contexts,