The question is as follows:
Consider two independent Poisson processes $N^{(1)}(t), t\geq 0$ and $N^{(2)}(t), t\geq 0$. Let $T = \inf\{t:N_t^{(1)} > 0\}$ be the time of the first point in the process, and let $X = N^{(2)}(T^{(1)}_1)$ be the number of points in the second process that occur before the first point in the first process. What are $\mathbb{E}(X\mid T)$ and $\mathbb{E}(X^2\mid T)$?
The definition of condition expectation is that for random variables $X, Y$, $\mathbb{E}(X\mid Y)$ is a $\sigma(Y)$-measurable random variable with
$$\int_G\mathbb{E}(X\mid Y) \, d\mathbb{P} = \int_G X \, d\mathbb{P} \quad \text{for all } G \in \sigma (Y)$$
Regarding the problem, it is clear that given $T = t$, $X \sim \operatorname{Poisson}(t\lambda)$, where $\lambda$ is the rate of the second process, which means we that expectation and variance are both $t\lambda$ and the desired conditional expectations follow.
However, these are numbers, not random variables, so I this isn't actually a solution.
When we are conditioning on a discrete random variable, the approach above suffices, because the $\sigma$-algebra $\sigma (Y)$ is a countable union of preimages, so we have the countable series $\mathbb{E}(X\mid Y) = \sum_y \mathbb{E}(X\mid Y = y)\mathbb{1}_{Y = y}$, and then considering each $\omega \in \Omega$ the result follows.
However, $T$ in the question is a continuous random variable, so in particular its support is uncountable, so this trick does not work.
I really have no idea how to proceed beyond this, and any help would be much appreciated.
In applied problems like these, I think a general rule of thumb is that you don't want to think about the measure theoretic foundations unless otherwise prompted. That said, since you're thinking more rigorously, I'll make some notational changes that might clarify what's going on behind the scenes. (This is not what you should do in practice, when it's just easier to fudge notation like the rest of us.) Let $Z$ be a random variable on the probability space $(\Omega, \mathcal{F}, P)$. For the sake of exposition, suppose $Z$ is absolutely continuous with respect to $P$, so that there is a density function $\zeta : \Omega \to \mathbb{R}$ such that expectation against $Z$ can be written as $\int_\Omega E[f(Z)] = f(\omega) \zeta(\omega) \ P(d\omega)$. As a shorthand, we will write expectation against $Z$ as $E_Z[\:\cdot\:]$ as an operator on functions. This will suffice for our uses.
First, let's address some basic points. The interarrival times of a Poisson Process with rate $\lambda$ are i.i.d. exponential. Therefore $T \sim \mathsf{Exponential}(\lambda)$, since $T$ is simply the length of the first interarrival time. We should note that $E_T[t \mapsto t] = \lambda^{-1}$.
Next, for a given $t > 0$, we know that $E[N^{(2)}(t)] = \lambda t$, since $N^{(2)}(t) \sim \mathsf{Poisson}(\lambda t)$.
To compute $E[X | T]$, I recommend the "double expectation" trick. Can we compute $E[X | T=t]$? Of course, since that is just $E[N^{(2)}(t)] = \lambda t$. So, using the double expectation identity $E_T[N^{(2)}(T)] = E_T[t \mapsto E[N^{(2)}(t)]]$, we can evaluate \begin{align} E_T[t \mapsto E[N^{(2)}(T)|T=t]] &= E_T[t \mapsto E[N^{(2)}(t)]] \\ &= E_T[t \mapsto \lambda t] \\ &= \lambda E_T[t \mapsto t] \\ &= \lambda \cdot \lambda^{-1} \\ &= 1. \end{align}
Similarly, \begin{align} E_T[t \mapsto E[(N^{(2)}(T))^2|T=t]] &= E_T[t \mapsto (E[N^{(2)}(t))^2]] \\ &= E_T[t \mapsto \lambda t(1+\lambda t)] \\ &= \lambda E_T[t \mapsto t+\lambda t^2] \\ &= \lambda \cdot \int_0^\infty (t + \lambda t^2) \cdot \lambda \exp(-\lambda t) \ dt \\ &= 3. \end{align}
Like I said, with practical problems it's best to play a bit fast-and-loose with notation. Usually "notationally correct" just gets in the way.