Magnetic exchange and charge transfer in mixed‐valence manganites and cuprates