Is this really necessary to worry about? If you have 2.7K pullups to 3.3V on the
peripheral board, and the 5V chip pullups are enabled then, due to voltage-divider
action, you'll only get a voltage increase at the pins of
(5v-3.3V) * 2.7K/(2.7K+40K) = 0.1V <-- 328 chip
(5v-3.3V) * 2.7K/(2.7K+10K) = 0.36V <-- 2560 chip
exclusive of the clamping effect of the internal diodes in the 3.3V chip. IOW,
3.4V or 3.66V. I doubt that would damage anything. The clamping diodes are
barely even engaged. Also, you have the 40K/10K pullups limiting the current
flow into the clamping diodes. So, ????
The other thing is, just for general safety issues, I always use small value
series-Rs [220-330 ohms] in the I/O lines, in any case.