$\newcommand{\id}{\operatorname{Id}}$ $\newcommand{\tr}{\operatorname{tr}}$
Let $d \in \mathbb{N}, d \ge 2$. Let $D \in M_d$ be a non-zero diagonal matrix.
Consider the equation $\Sigma^2=(\det \Sigma)^{\frac{2}{d}}\id+D$ where $\Sigma$ is a diagonal real $d \times d$ matrix with non-negative values.
I found two necessary conditions for the existence of a solution:
(1) $\tr(D) > 0$.
(2) Not all the diagonal elements (of $D$) are positive.
(Proofs are at the end).
Question: Suppose $\tr(D) > 0$, and that not all the elements of $D$ are positive. Is there a solution? How many solutions are there?
Can the solutions be expressed "nicely" in terms of $D$?
For the case $d=2$, I showed below that indeed these conditions are sufficient, and when they hold there is a unique solution:
Denoting $D=\begin{pmatrix} \lambda_1 & 0 \\\ 0 & \lambda_2 \end{pmatrix}$, the solution is given by
$$\Sigma=\begin{pmatrix} \frac{|\lambda_1|}{\sqrt{\tr(D)}} & 0 \\\ 0 & \frac{|\lambda_2|}{\sqrt{\tr(D)}} \end{pmatrix} \tag{1}=\frac{|D|}{\sqrt{\tr(D)}}.$$
Any ideas how to solve the general case?
(For the interested, I got to this equation after studying the modified conformality equation $ A^TA=|\det A|^{\frac{2}{d}}\id+B$ and using its orthogonal invariance).
Proofs of the necessary conditions:
(1): $\tr(D) > 0$.
Indeed, denoting $\Sigma=\operatorname{diag}(\sigma_1,...,\sigma_d)$, $\sigma_i^2=\alpha_i$ we take the trace: $$ \tr(\Sigma^2)=\sum_{i=1}^d \alpha_i = d(\Pi_{i=1}^d \alpha_i)^{\frac{1}{d}}+\tr(D),$$ hence $$ \frac{\tr(D)}{d} =\frac{\sum_{i=1}^d \alpha_i}{d}-(\Pi_{i=1}^d \alpha_i)^{\frac{1}{d}} \ge 0,$$ and equality holds if and only if $\alpha_1=\alpha_2=\dots=\alpha_d$ (This is the AM–GM inequality).
In the equality case, we get $\alpha_i=\alpha,\sigma_i=\sigma=\sqrt{\alpha}$, so $\Sigma =\sigma \id$ is conformal, so $D=0$ which contradicts our assumption.
(2): Not all the diagonal elements are positive.
Denote $D=\operatorname{diag}(\lambda_1,...,\lambda_d)$. Then the equation is $$\sigma_i^2-(\Pi_{i=1}^d \sigma_i)^\frac{2}{d}=\lambda_i,i=1,\dots,d$$
If all the $\lambda_i$ are positive, then each $\sigma_i$ is greater than their geometric mean, which is impossible.
General observation: Denoting $\Sigma=\operatorname{diag}(\sigma_1,...,\sigma_d),D=\operatorname{diag}(\lambda_1,...,\lambda_d)$ the equation reduces to: $$\sigma_i^2-(\Pi_{i=1}^d \sigma_i)^\frac{2}{d}=\lambda_i, i=1,...,d$$
In particular $\sigma_1^2-\sigma_j^2=\lambda_1-\lambda_j$. Since $\sigma_i \ge 0$, $\sigma_1$ determines all the other $\sigma_j$.
Analysis of the $2D$ case:
Recall that $D=\begin{pmatrix} \lambda_1 & 0 \\\ 0 & \lambda_2 \end{pmatrix}$, and that we assumw $\tr(D)=\lambda_1+\lambda_2 >0$:
$\sigma_i^2- \sigma_1\sigma_2=\lambda_i,$ so $ \sigma_1^2-\sigma_2^2=\lambda_1-\lambda_2,(\sigma_1-\sigma_2)^2=\lambda_1+\lambda_2$.
Since we assumed $D \neq 0$, $\sigma_1 \neq \sigma_2 $ so we divide an obtain $$ \frac{\sigma_1+\sigma_2}{\sigma_1-\sigma_2}=\frac{\lambda_1-\lambda_2}{\lambda_1+\lambda_2}:=\lambda,$$ hence $\sigma_1+\sigma_2=\lambda\sigma_1-\lambda\sigma_2 \Rightarrow \sigma_1(1-\lambda)=-\sigma_2(\lambda+1)$.
Now we divide into cases:
(1) $\lambda_1=0$: This forces $\lambda_2 > 0$. Then $\sigma_1(\sigma_1-\sigma_2)=0 \Rightarrow \sigma_1=0 \Rightarrow \sigma_2^2=\lambda_2$.
In this case $\sigma_2=\sqrt{\lambda_2}$, i.e $\Sigma = \sqrt{D}$.
(2) $\lambda_1 \neq 0$: Then $1+\lambda \neq 0$, so $ \sigma_2=\sigma_1\frac{\lambda-1}{\lambda+1}=-\frac{\lambda_2}{\lambda_1}\sigma_1$.
From the equation $\sigma_1^2- \sigma_1\sigma_2=\sigma_1^2(1+\frac{\lambda_2}{\lambda_1} ) =\sigma_1^2(\frac{\lambda_1+\lambda_2}{\lambda_1} )=\lambda_1$, so
$$\sigma_1^2 = \frac{\lambda_1^2}{\lambda_1+\lambda_2}=\frac{\lambda_1^2}{\tr(D)}.$$ Finally, $$ \sigma_1 = \frac{|\lambda_1|}{\sqrt{\tr(D)}},\sigma_2 = -\frac{\lambda_2}{\sqrt{\lambda_1+\lambda_2}}=\frac{|\lambda_2|}{\sqrt{\tr(D)}}. \tag{2}$$
We observe that the solution in case $(1)$ is in fact in the form of $(2)$.
This is not a question about linear algebra. Let $D=diag(d_i),\Sigma=diag(\sigma_i),m=(\Pi_i{\sigma_i}^2)^{1/d}$. Necessarily $m\geq \sup_i(-d_i)$ and $\sigma_i=\sqrt{m+d_i}$.
Case 1. $m=0$. Then, for every $i$,$d_i\geq 0$, there is $j,k$ s.t. $d_j=0,d_k\not= 0$ and, for every $i$, $\sigma_i=\sqrt{d_i}$.
Case 2. $m>0$. Then, let $K=\{j|d_j\not= 0\}$. For every $j\in K$, $1+d_j/m>0$ and $\Pi_{j\in K}(1+d_j/m)=1$. We consider the continuous function $$f:x\in[\sup_i(-d_i),+\infty[\rightarrow \Pi_{j\in K}(1+d_j/x).$$ We look for $m$ s.t. $f(m)=1$. When $x\rightarrow +\infty$, $f(x)=1+trace(D)/x+o(1/x)$ and, since $trace(D)>0$, $\lim_{x\rightarrow +\infty}=1+$.
i) For every $i$, $d_i\geq 0$ and there is $j$ s.t. $d_j=0$. Then ${\sigma_j}^2=m$ and for every $i$, ${\sigma_i}^2\geq m$. Consequently, the $(\sigma_i)$'s are equal, that is contradictory (cf. the OP's post).
ii) There is $i$ s.t. $d_i<0$; then, $\sup_i(-d_i)>0$; thus $f(\sup_i(-d_i))=0$ and we are done.
EDIT 1. (To Asaf Shachar). I just read your last post. Unfortunately, $f$ is not monotone because it is decreasing in a neighborhood of $+\infty$ (its derivative is $\approx -trace(D)/x^2$). Then, I proved only that the equation $f(x)=1$ has at least one solution.
EDIT 2. To @ Asaf Shachar. Now I prove (with the help of a colleague) that there is exactly one solution; it suffices to show that the function $$f'/f:x\in ]\sup_i(-d_i),+\infty[\rightarrow \sum_{j\in K}(\dfrac{1}{x+d_j}-\dfrac{1}{x})$$ has exactly one zero.
Proof. We assume that $d_1<\cdots<d_p<0<d_{p+1}<\cdots <d_k,\sum_{i\leq k}\alpha_id_i>0$, where $\alpha_i$ is the "multiplicity" of $d_i$. We consider the function
$$g:x\notin \{-d_j|j\leq k\}\rightarrow \sum_{j\leq k }\dfrac{\alpha_jd_j}{x(x+d_j)}.$$ Note that $g(x)=\dfrac{P_{k-1}(x)}{x\Pi_i(x+d_i)}$, where $degree(P_{k-1})=k-1$, and $g(x)=0$ iff $P_{k-1}(x)=0$, that is, $g$ has at most $k-1$ roots. Considering the ($\lim_{x\rightarrow \pm -d_i}g(x)$)'s, wee obtain that $g$ has at least a root in $]-d_k,-d_{k-1}[,\cdots$, in $]-d_{p+1},-d_p[$, in $]-d_{p-1},-d_{p-2}[,\cdots$, in $]-d_2,-d_1[$; moreover, we know that $g$ has at least a root $>-d_1$ and thus, we have our $k-1$ roots and we are done.