You can host your own Postgres on Compute Engine [1] or use a hosted provider like ElephantSQL [2]. You can use whatever client library you want to connect to postgres in App Engine flexible.
Same story for redis - you can host it on Compute Engine [3] or use something like redislabs.
[1] https://cloud.google.com/solutions/set-up-postgres
[2] https://www.elephantsql.com/
[3] https://cloud.google.com/launcher/?q=redis
Note: I'm in Developer Relations for Google Cloud Platform