Mean-field Dynamics of Rydberg-Dressed Bosonic Atoms in Free-Space and Optical Lattices