Multiline equation with some characters that span all lines

The image has several inconsistencies in the typesetting.

I suggest to define semantic commands in order to be sure that similar objects are always typeset the same.

I don't like \ell, but you can use it in place of the plain l.

\documentclass{article}
\usepackage{amsmath}

\newcommand{\func}[1]{\mathit{#1}}

\begin{document}

\begin{equation*}
\Pr\left[
  X \gets \func{DECODE}(\Delta;r_1,\dots,r_l)
\;\middle|\;
  \begin{matrix}
  (\Delta;q_1,\dots,q_l) \gets \func{QUERY}(1^\lambda;J) \\
  \Lambda(\Lambda_{j=1}^l \gets \func{RESPOND}(X^{(j)};q_j))
  \end{matrix}
\right]
\end{equation*}

\end{document}

enter image description here

A slightly different approach, where you specify the brackets as inherently attached to \Pr and can choose their size (see the documentation of \DeclarePairedDelimiter in mathtools). Basically, \Pr* selects automatic size, \Pr[\big] (or any other delimiter size changing command in the optional argument) selects the stated size.

\documentclass{article}
\usepackage{amsmath,mathtools}

\newcommand{\func}[1]{\mathit{#1}}

\renewcommand{\Pr}{\operatorname{Pr}\brackets}
\DeclarePairedDelimiterX{\brackets}[1]{[}{]}{#1}
\newcommand{\given}{\;\delimsize|\;\mathopen{}}

\begin{document}

\begin{equation*}
\Pr*{
  X \gets \func{DECODE}(\Delta;r_1,\dots,r_l)
\given
  \begin{matrix}
  (\Delta;q_1,\dots,q_l) \gets \func{QUERY}(1^\lambda;J) \\
  \Lambda(\Lambda_{j=1}^l \gets \func{RESPOND}(X^{(j)};q_j))
  \end{matrix}
}
\end{equation*}

\begin{equation*}
\Pr[\Big]{
  X \gets \func{DECODE}(\Delta;r_1,\dots,r_l)
\given
  \begin{matrix}
  (\Delta;q_1,\dots,q_l) \gets \func{QUERY}(1^\lambda;J) \\
  \Lambda(\Lambda_{j=1}^l \gets \func{RESPOND}(X^{(j)};q_j))
  \end{matrix}
}
\end{equation*}

\begin{equation*}
\Pr[\bigg]{
  X \gets \func{DECODE}(\Delta;r_1,\dots,r_l)
\given
  \begin{matrix}
  (\Delta;q_1,\dots,q_l) \gets \func{QUERY}(1^\lambda;J) \\
  \Lambda(\Lambda_{j=1}^l \gets \func{RESPOND}(X^{(j)};q_j))
  \end{matrix}
}
\end{equation*}

\end{document}

enter image description here


enter image description here

by use of array:

\documentclass{article}
\usepackage{amsmath}

\begin{document}
\[
\Pr \left[X\leftarrow\text{DECODE}(\Delta;r_1,\dotsc,r_\ell)\ \middle|
    \begin{array}{l}
    (\Delta;q_1,\dotsc,q_\ell)\leftarrow \text{QUERY}(1^\lambda;J) \\
     \Lambda(\Lambda^\ell _{j=1}) \leftarrow\text{RESPOND}(X^{(j)}:q_j)
     \end{array}
    \right]
\]
\end{document}

My main suggestions are (a) use \biggl[, \biggm|, and \biggr] to structure the equation and (b) use a two-row array environment for the material between \biggm| and \biggr]. I wouldn't use a multline* environment, though. An unnumbered single-line display math environment does fine.

enter image description here

\documentclass{article}
\usepackage{amsmath}
\usepackage{array}   % for '\newcolumntype' macro
\newcolumntype{L}{>{\displaystyle}l} % automatic displaystyle math mode
\begin{document}
\[
\Pr\biggl[
X\leftarrow \mathit{DECODE}(\Delta;r_1,\dots,r_\ell) 
\biggm| 
\begin{array}{@{}L@{}}
   (\Delta;q_1,\dots,q_\ell)\leftarrow \mathit{QUERY}(1^\lambda;J) \\
   \Lambda \bigl(\Lambda^\ell_{j=1}\leftarrow \mathit{RESPOND}(X^{(j)};q_j)\bigr)
\end{array}
\biggr]
\]
\end{document}