How do i send data from a Master to another Master?
Both your master devices must support Multimaster mode, i.e. Arbitration and Synchronization. See I2C Spec here for a description of the arbitration process.
It's up to you to handle a lost arbitration in your software.


  or are there other solutions to have the ESP32 communicate to the
  ATMega?


Of course. As you considered I2C to be sufficient, UART and SPI are feasible alternatives supported by almost all microcontrollers.