Actually, it looks to me that there's a conflation of two different issues. According to the boxed statement in the OP, we just have to exhibit a functor $h^\ast: \mathbf{C}/C' \to \mathbf{C}/C$ for a fixed morphism $h: C \to C'$. We are <b>not</b> being asked to prove that we can choose a strict functor (as opposed to a pseudofunctor) $$\mathbf{C}^{op} \to Cat$$ which takes each object $C$ to the slice $\mathbf{C}/C$, and morphisms $h$ to pullback functors, which appears to be the issue Andrej is discussing. The issue being discussed in the boxed statement is easy, and can be boiled down to this: if $\mathbf{C}$ has pullbacks, then for each $h: C \to C'$ the pushforward functor $\sum_h: \mathbf{C}/C \to \mathbf{C}/C'$ (taking each object $f: X \to C$ in the domain to the object $h \circ f: X \to C'$ in the codomain, and similarly on morphisms) has a right adjoint (which is of course a functor) $h^\ast$. Here we need only choose a pullback object $h^\ast g$ for each object $g: Y \to C'$ in $\mathbf{C}/C'$, and then define $h^\ast$ on morphisms in the way dictated by the universal property. In other words, any choice of pullback $h^\ast g$, one for each object $g$ in $\mathbf{C}/C'$, defines a universal arrow $$\Phi_g: \sum_h (h^\ast g) \to g$$ so that having made these choices and given a morphism $f: g \to g'$ in $\mathbf{C}/C'$ (i.e., a commutative triangle), we may then define $h^\ast f: h^\ast g \to h^\ast g'$ to be the unique arrow such that $$\Phi_{g'} \circ \sum_h (h^\ast f) = f \circ \Phi_g$$ and functoriality of $h^\ast$ is assured by the usual universal arguments.