We show that indirect spin-spin interactions between effective spin-1/2 systems can be realized in two parallel 1D optical lattices loaded with polar molecules and/or Rydberg atoms. The effective spin can be encoded into low-energy rotational states of polar molecules or long-lived states of Rydberg atoms, tightly trapped in a deep optical lattice. The spin-spin interactions can be mediated by Rydberg atoms, placed in a parallel shallow optical lattice, interacting with the effective spins by charge-dipole (for polar molecules) or dipole-dipole (for Rydberg atoms) interaction. Indirect XX, Ising and XXZ interactions with interaction coefficients $J^{bot}$ and $J^{zz}$ sign varying with interspin distance can be realized, in particular, the $J_{1}-J_{2}$ XXZ model with frustrated ferro-(antiferro-)magnetic nearest (next-nearest) neighbor interactions.