The environment variables passed to a provider plugin are always those inherited from the Terraform process itself. There is no facility to set them differently for a particular plugin process.
The fact that most providers run as child processes of Terraform Core is an implementation detail from the perspective of the main language, so there are no language features which directly expose that implementation detail.
The supported mechanism for per-instance provider configuration is the provider configuration settings. Terraform will only call the configure function on your provider once per process, so it is okay in principle for your configure function to call os.Setenv to override your process’s own environment based on the provider configuration, as long as whatever is using this environment variable doesn’t run until after the provider is configured.
Are you asking if an env var can be read within a provider? If so, it can with the value coming from the environment where you run Terraform from. So you can adjust that environment by using export or similar.
Are you asking how configuration can be passed to a provider (not specifically env vars)? If so your provider can define parameters that can be specified in the provider block, set to whatever you want (within the *.tf files).
Are you asking if it is possible to get or set env vars withing the *.tf files? If so, then no as HCL doesn’t directly interact with env vars - you can have a variable pick up its value from an env var (with a specifically formatted name) if wanted.
Could you give a bit more detail on what you are trying to achieve?
No, I don’t expect this would ever be implemented. The provider configuration is the only supported way to vary provider behavior based on settings in the Terraform configuration.