Your question is actually far too general, so let me assume $n=2$. Also in this case, there are only partial results.
In the case where all $a_i$ are equal to $1$, Kurchle and (independently) Xu showed that
$$H=\pi^*(dL) - \sum_{i=1}^r E_i$$
(where $L$ is the class of a line) is ample, provided that $H^2 > 0$ and $d \geq 3$.
Later, Szemberg and Tutaj-Gasinska, in their paper General blow-ups of the projective plane (Proceedings of the Amer. Math. Soc. 130, 2002), proved the following (non optimal) result:
Theorem. Let $X$ the blow-up of $\mathbb{P}^2$ at $r$ general points and let $k\geq 2$ and $r$ be integers such that $d \geq 3k+1$. If $r \leq \frac{d^2}{k^2} -1$, then the line bundle $$H=\pi^*(dL) -k \sum_{i=1}^r E_i$$ is ample.
I refer you to Szemberg-Tutaj-Gasinska paper for more details on this problem and on its relations with the so-called Nagata Conjecture.
In higher dimensions, there is a paper by Angelini that generalizes the result of Xu for $n=3$, in the case where all blown-up subvarieties are points. See Ample divisors on the blow up of $\mathbb{P}^3$ at points , Manuscripta Mathematica 93 (1997).
Note that without any assumption on the singularities the answer to your question is yes. For instance, consider the hypersurface $Y = \{x_0^2+x_1^3+x_2^4\}\subset\mathbb{P}^3$. Then $Sing(Y) = [0:0:0:1]$. The projective tangent cone of $Y$ in the singular point is not reduced. Therefore, the singularity is not ordinary. Let $\pi:X\rightarrow\mathbb{P}^3$ be the blow-up of $[0:0:0:1]$. It is easy to check that the singular locus of the strict transform $\widetilde{Y}\subset X$ contains a curve.
On the other hand, if the singularities are ordinary this can not happen.
More precisely:
Let $W\subset Z\subset X$ be smooth projective varieties, and let $Y\subset X$ be a projective variety such that $Sing(Y) = Z$ and $Y$ has ordinary singularities along $Z$. Let $\pi_W:X_W\rightarrow X$ be the blow-up of $W$, and $Z_W$, $Y_W$ the strict transforms of $Z$ and $Y$ respectively. Then $Sing(Y_W) = Z_W$ and $Y_W$ has ordinary singularities along $Z_W$.
Here is the proof:
The inverse image via $\pi_W$ of $Z$ is given by $Z_W\cup E_W$, where $E_W$ is the exceptional divisor of $\pi_W$. Now, we may consider the blow-up $\pi_{Z_w}:X_{Z_W}\rightarrow X_W$ of $Z_W\cup E_W$ in $X_W$, and the blow-up $\pi_Z:X_Z\rightarrow X$ of $Z$ in $X$. Note that since $E_W$ is a Cartier divisor in $X_W$ its blow-up does not produce any effect. By Corollary 7.15 in Harshorne there exists a morphism $f:X_{Z_W}\rightarrow X_Z$ such that $\pi_Z\circ f = \pi_W\circ \pi_{Z_{W}}$. Therefore, the morphism $f$ must map the exceptional divisor $E_{Z_W}$ of $\pi_{Z_W}$ onto the exceptional divisor $E_{Z}$ of $\pi_Z$. Furthermore, $f$ contracts the strict transform $\tilde{E}_W$ of $E_W$ in $X_{Z_W}$ onto $\pi_{Z}^{-1}(W)\subset E_Z$.
Now, let $g:\widetilde{X}_Z\rightarrow X_Z$ be the blow-up of $\pi_{Z}^{-1}(W)$. By the universal property of the blow-up, see Proposition 7.14 Hartshorne, there exits a unique morphism $\phi:X_{Z_W}\rightarrow \widetilde{X}_Z$ such that $g\circ\phi = f$.
Note that since we just blew-up smooth subvarieties both $X_{Z_W}$ and $\widetilde{X}_Z$ are smooth with Picard number $\rho(X_{Z_W}) = \rho(\widetilde{X}_Z) = \rho(X)+2$. In particular, the birational morphism $\phi:X_{Z_W}\rightarrow \widetilde{X}_Z$ can not be a divisorial contraction. Notice that $\phi$ can not be a small contraction either because otherwise $\widetilde{X}_Z$ would be singular. We conclude that $\phi$ is a bijective morphism, and since both $X_{Z_W}$ and $\widetilde{X}_Z$ are smooth $\phi$ is an isomorphism.
Now, let $Y_W$ be the strict transform of $Y$ in $X_W$, and assume that $Z_W\subsetneqq Sing(Y_W)$. Therefore, the strict transform $Y_{Z_W}$ of $Y_W$ in $X_{Z_W}$ is singular, and since $g$ is just the blow-up of a smooth variety the image $(g\circ \phi)(Y_{Z_W}) = f(Y_{Z_W})\subset X_Z$ is singular as well. Note that $f(Y_{Z_W})\subset X_Z$ is nothing but the strict transform of $Y$ via $\pi_Z$, and since $Sing(Y) = Z$ and $Y$ has ordinary singularities along $Z$ the blow-up $\pi_Z$ resolves the singularities of $Y$. A contradiction. We conclude that $Sing(Y_W) = Z_W$. Finally, if the intersection $Y_{Z_W}\cap E_{Z_W}$ is not transversal then the intersection $Y_Z\cap E_Z$ is not transversal as well. But this can not happen because the singularities of $Y$ are ordinary. Therefore, $Y_W$ has ordinary singularities along $Z_W$.
Best Answer
So you want to compute the intersection numbers $(H^p\cdot E^q)$, $p+q=n$.
Let me start with some notation. Let $b: X\rightarrow \mathbb{P}^n$ be the blowing up, $i:E \hookrightarrow X$ the embedding, $p:E\rightarrow Y$ the projection. Write one factor $E$ as $i_*1$ (in $CH(X)$, say) and use the projection formula twice: $$(H^p\cdot E^q)=(i^*E^{q-1}\cdot p^*H_Y^p)=(p_*i^*E^{q-1}\cdot H_Y^p)\quad \mbox{where }\ H_Y:=c_1(\mathcal{O}_{\mathbb{P}^n}(1))_{|Y}\ .$$ We have $i^*E=-h$, where $h$ is the first Chern class of the tautological line bundle $\mathcal{O}_E(1)$ on $E=\mathbb{P}(N^*_{Y/\mathbb{P}^n})$. The classes $s_m:=p_*h^{m+c-1}$ (with $c=\mathrm{codim}(Y)$) are the Segre classes of $N_{Y/\mathbb{P}^n}$; they are easily calculated from the Chern classes, see Fulton Intersection Theory, Chapter 3. So the numbers $(H^p\cdot E^q)=(-1)^{q-1}s_{q-c}\cdot H_Y^p$ can be calculated when you know the Chern classes of the normal bundle. In codimension 2 you just have two nonzero Chern classes, so the computation is relatively easy. For instance, if $n=3$ and $Y$ is a curve of degree $d$ and genus $g$, you find $(-K_X^3)= 64-8d+2g-2$.