How to specify custom /etc/default file in elasticsearch 7

The answer to this (at least for version 7.7.0) is that you can't do it seamlessly with any option or environment variable because it is not provided. However it is possible to edit the file /usr/share/elasticsearch/elasticsearch-env that comes with the package installation and replace line 81 with the following:

if [ ! -z "$ES_DEFAULT" ]; then
  source $ES_DEFAULT
else
  source /etc/default/elasticsearch
fi

Then it is possible to set ES_DEFAULT in the system service file to point to a different /etc/default file.

[Service]
...
Environment=ES_DEFAULT=/etc/default/elasticsearch-development