Slower deviations of the branching Brownian motion and of branching random walks