Conditional moderately large deviation principles for the trajectories of random walks and processes with independent increments