If there was a crossover, Hermione would probably be very interested in the technology in the DC universe. She might try to study it and figure out how it works compared to magic. Martians' telepathic abilities would allow them to communicate with the characters in the Harry Potter universe without the need for a common language. For example, a Martian could communicate with Ron Weasley and help him overcome his insecurities by sharing thoughts and experiences. Batman would be a bit of an enigma to the Hogwarts students. His lack of superpowers but high intelligence and combat skills would be something new for them to understand.
Harry Potter and Superman would have an interesting interaction. Superman's super strength and invulnerability might be a source of wonder for Harry, while Superman could be intrigued by the magic Harry wields. Martians, like J'onn J'onzz, could interact with both. J'onn could use his shape - shifting ability to blend in at Hogwarts and learn about magic, and also team up with Superman to face any threats that cross over from the wizarding world.