Here is a tikzcd and a forest solution that share the styles vert down, lab and lab'. Both use fit to draw a rectangular around a set of nodes as part of the submatrix key.
I've connected \theta^X to X_{ne} and not any of the rectangle since the arrow in your sketch doesn't touch any rectangle's border.
I have defined the \bgarrow macro for tikzcd in a previous answer of mine.
Both solutions create a “fake” inner node that exists only for the outer node for reference. After the outer node has created (and has been placed on the background) the inner node will be placed on top of the outer one but still on the background.
If you have to use this with more than two rectangulars, an easier solution will need to be developed (say a list of rectangles that will be faked from top to bottom but drawn from bottom to top).
Code
\documentclass[tikz]{standalone}
\usepackage{tikz-cd, forest}
\usetikzlibrary{fit, backgrounds}
\makeatletter
\let\tikzcd@ar@new@orig\tikzcd@ar@new
\def\tikzcd@ar@new@bg[#1]{% https://tex.stackexchange.com/a/664328/16595
\pgfutil@g@addto@macro\tikzcd@savedpaths{%
\pgfonlayer{background}\path[/tikz/commutative diagrams/.cd,every arrow,#1]%
(\tikzcd@ar@start\tikzcd@startanchor)to(\tikzcd@ar@target\tikzcd@endanchor);
\endpgfonlayer}\let\tikzcd@ar@new\tikzcd@ar@new@orig}
\tikzcdset{every diagram/.append code=%
\def\bgarrow{\let\tikzcd@ar@new\tikzcd@ar@new@bg\tikzcd@arrow}%
\let\bgar\bgarrow}
\makeatother
\tikzset{
vert down/.style={to path={--(\tikztostart|-\tikztotarget.north)\tikztonodes}},
lab/.style={label={[anchor=south east]south east:$#1$}},
lab'/.style={label={[anchor=south west,name=placeholder,xshift=-\pgfkeysvalueof{/pgf/inner xsep}]
south east:\phantom{$#1$}}},
submatrix/.style args={[#1]#2:#3}{
fit={#2},name={#3},node contents=,draw,#1}}
\tikzset{
roundnode/.style={circle, draw=blue!60, fill=blue!5, very thick},
squarednode/.style={rectangle, draw=red!60, fill=red!5, very thick}}
%% tikzcd
\tikzcdset{
submatrix/.style args={[#1]#2:#3}{
to path={node[inner sep=+.85ex,name prefix=\tikzcdmatrixname-,submatrix={[{#1}]{#2}:{#3}}]}},
rows'/.style 2 args={
/utils/temp/.style={/tikz/row ##1/.append style={nodes={#2}}},/utils/temp/.list={#1}}}
%% forest
\tikzset{forest edge/.style={style/.expanded=\forestoption{edge}}}
\begin{document}
\begin{tikzcd}[
column sep=small, rows'={1,4}{squarednode}, rows'={2,3}{roundnode}]
\theta_e^I & \theta_e^V & \theta_e^Y \
F_{ne} \drar
& V_{ne} \dar
& Y_{ne} \dlar \lar \
& X_{ne} \
& \theta^X \uar
%
\arrow [submatrix={path only, lab'=E (2-3)(3-2) :inner}]
\bgarrow[submatrix={fill=blue!10, lab=E (inner)(placeholder):outer}]
\bgarrow[submatrix={fill=blue!40, lab=N, inner sep=+0pt :inner}]
%
\arrow[from=1-1, to=inner, vert down]
\arrow[from=1-2, to=inner, vert down]
\arrow[from=1-3, to=inner, vert down]
\end{tikzcd}
\begin{forest}
for tree={grow'=90, math content, edge+=<-},
where level={0}{squarednode}{}, where level={3}{squarednode}{},
where level={1}{roundnode}{}, where level={2}{roundnode}{},
[\theta^X
[X_{ne}, edge+=->
[F_{ne} [\theta_e^I, no edge]]
[V_{ne} [\theta_e^V, no edge]]
[Y_{ne} [\theta_e^Y, no edge]]
]
]
%
\begin{pgfonlayer}{background}
\node[submatrix={[path only, lab'=E] (!1)(!11)(!12)(!13) :inner}];
\node[submatrix={fill=blue!10, lab=E(!111)(!121)(!131)(placeholder):outer}];
\node[submatrix={fill=blue!40, lab=N, inner sep=+0pt :inner}];
\end{pgfonlayer}
\foreach \thet in {1,2,3}
\path[forest edge,->] (!1\thet 1) edge[vert down] (inner);
\path[forest edge] (!12) edge (!13);
\end{forest}
\end{document}
Output


forestpackage andfitTikZ library seems to be promising way to solve your problem. – Zarko Nov 21 '22 at 06:22fitlibrary seems promising, but I'm not sure aboutforest. This is not exactly a tree if you look closely: there is an additional edge fromY_{ne}toV_{ne}. – nalzok Nov 21 '22 at 06:28\matrixto me than a tree but both are possible. – Qrrbrbirlbel Nov 21 '22 at 09:54