Motivated by the recent discovery of superconductivity in doped NdNiO2, we study the magnetic exchange interaction J in layered d9 nickelates from first principles. The mother compounds of the high-Tc cuprates belong to the charge-transfer regime in the Zaanen-Sawatzky-Allen diagram and have J larger than 100 meV. While this feature makes the cuprates very different from other transition metal oxides, it is of great interest whether layered d9 nickelates can also have such a large J. However, one complexity is that NdNiO2 is not a Mott insulator due to carrier doping from the block layer. To compare the cuprates and d9 nickelates on an equal basis, we study RbCa2NiO3 and A2NiO2Br2 (A: a cation with the valence of 2.5+), which were recently designed theoretically by block-layer engineering. These nickelates are free from the self-doping effect and belong to the Mott-Hubbard regime. We show that these nickelates share a common thread with the high-Tc cuprates in that they also have a significant exchange interaction J as large as about 100 meV.