Nano- and microparticles for pulsed and endosomal release