SQL Server 2019 Developer edition is legal licensed only for non-production use. If your environments are not accessed by end-users of an app and are only available for developing and testing purposes, then you can use it.
Reference:
SQL Server 2019 Licensing guide