$\textbf{Case 1: } p=q$
The set of the divisors of the number $n$ is:
$D=\{1,p,p^2\}$.
$1+p^2+p^4=p^4+6p^2+9\Longrightarrow 5p^2+8=0$, contradiction.
Hence, we don't have natural solutions in this case.
$\textbf{Case 2: } p,q$ are distinct
The set of the divisors of the number $n$ is:
$D=\{1,p,q,pq\}$.
$1+p^2+q^2+p^2q^2=p^2q^2+6pq+9\Longrightarrow$
$\Longrightarrow \begin{cases}p^2+2pq+q^2=8pq+8;\\p^2-2pq+q^2=4pq+8.\end{cases}\Longrightarrow$
$\Longrightarrow \begin{cases}(p+q)^2=8pq+8;\\(p-q)^2=4pq+8.\end{cases}$
$\Longrightarrow \begin{cases}4\cdot2(n+1)=(p+q)^2;\\4(n+2)=(p-q)^2.\end{cases}$
The relations are possible only if $p,q$ are both odd numbers and results:
$\begin{cases} 2(n+1)=\left(\dfrac{p+q}{2}\right)^2;\\n+2=\left(\dfrac{p-q}{2}\right)^2.\end{cases}$
With the notations
$\dfrac{p+q}{2}=k;\dfrac{|p-q|}{2}=m$
results:
$\begin{cases}2(n+1)=k^2;\\n+2=m^2;\end{cases}$ where $k,m\in\mathbb{N}$.
The problem has solutions, there exist numbers with the given property.
For example:
$n=287=41\cdot7$.