where the set $D$ is fixed, possibly unbounded, and $J$ depends on $\Omega$ via the spectrum of the Dirichlet Laplacian. We analyze the existence of a solution and its qualitative properties, and rise some open questions.