Here is a proof that $a_1(n, p, q) = a_2(n,p,q)$. 

The generating function for the Stirling numbers of the second kind is 
$$\sum_{n=i}^\infty {n\brace i}\frac{x^n}{n!}= \frac{(e^x-1)^i}{i!}.$$
Also
$$\prod_{j=0}^{i-1}(qj+1) = q^i i!\,\binom{1/q+i-1}{i}.$$
So
\begin{align*}
\sum_{n=0}^\infty a_1(n,p,q) \frac{x^n}{n!} 
  &=\sum_{i=0}^\infty \left( q\over p-q\right)^i (e^{x(p-q)} -1)^i\binom{1/q +i-1}{i}\\
  &=\left( 1-\displaystyle\frac{q}{p-q} (e^{x(p-q)}-1)\right)^{-1/q}\\
  &=\left(\frac{p-q}{p-qe^{x(p-q)}}\right)^{1/q}.
\end{align*}

The generating function for the Eulerian polynomials is 
$$
\sum_{n=0}^\infty A_n(t) \frac{x^n}{n!} = \frac{1-t}{e^{(t-1)x}-t}.
$$
Integrating with respect to $x$ gives
\begin{align*}
\sum_{n=1}^\infty A_{n-1}(t) \frac{x^n}{n!}
  &= \frac{1}{t}\left[ \log\left(1-t\over e^{(t-1)x} -t\right) +(t-1)x\right]\\
  &=\frac{1}{t}\log\left( 1-t \over 1-te^{(1-t)x}\right).
\end{align*}
Thus 
\begin{align*}
\log B(x) &=
\sum_{n=1}^\infty p^{n-1}A_{n-1}\left(q\over p\right)\frac{x^n}{n!}\\
  &=\frac{1}{q}\log\left( 1-q/p\over 1-(q/p) e^{(1-q/p)px} \right)\\
  &=\frac{1}{q}\log\left(p-q\over p-q e^{(p-q)x} \right),
\end{align*}
so 
$$B(x) = \left(\frac{p-q}{p-qe^{x(p-q)}}\right)^{1/q}
  =\sum_{n=0}^\infty a_1(n,p,q) \frac{x^n}{n!}.$$