There are probably very simple artificial construction of $E(N)$ with the desired properties but here is a fast way to make a sequence with $E(N) = \Theta(\frac{N}{\log(N)})$.
Let $\epsilon_n=1$ if $n$ is even or prime, and $-1$ otherwise.
Then $$E(N) = \frac{N}{2} + \pi(N) + \delta_N - [N - (\frac{N}{2} + \pi (N)+\delta_N)] = 2\pi(N) + 2\delta_N$$ where $|\delta_N|\le 2$ is bounded. By Prime Number Theorem, $\frac{E(N)}{N} \sim \frac{2}{\log N}\rightarrow 0$.
Now by Abel summation formula, $\sum_{n=1}^N\frac{\epsilon_n}{n}=\frac{E(N)}{N} + \sum_{n=1}^{N-1} \frac{E(n)}{n(n+1)}$. As $\frac{E(N)}{N}$ converges, it's enough to show $\sum_{n=1}^{\infty} \frac{E_n}{n(n+1)}$ diverges. But $\frac{E_n}{n(n+1)}\sim \frac{2}{(n+1)\log(n)}$ and the latter diverges by integral test. The desired follows by limit comparison test.
If we chooose $\epsilon_n$ by flipping a fair coin, by the (strong) law of large numbers, $\frac{E(N)}{N}\rightarrow 0$ almost surely. It's interesting to know what's the probability that $\sum \frac{\epsilon_n}{n}$ converges. By Kolmogorov's $0-1$ law, the probability is either $0$ or $1$, but I don't know which case it is.