In general, the higher the bit rate the higher the quality. You don't say what the bit rate is on the canon, but 24mbps is pretty common for 1080. I would say the most obvious difference will not be due to bit rate in this situation, but will be due to the difference in sensor size. The greater pixel size in the canon will give far superior low light video than the small sensor and pixel size in the legria.
There are so many factors to calculate when determining video quality. The bit rate is rather insignificant unless the camera settings are set up right to squeeze the optimal amount of information in that container. You need to make sure the exposure is correct without too much gain during recording mainly, and decreasing contrast during recording can help cram more light information into the small file size. The bigger sensor on the DSLR will allow for better low light performance and of course give you that shallow depth of field, but it does little is anything to help in terms of file compression quality.
Can anyone explain to me the quality difference, if any, between MP4 @ 24mbps recorded on a Legria G40 and MP4 @ IPB recorded on a Canon 7D MK 2?
This is an audio forum, specifically one about recording acoustic music and recording on location.
While there are some here who also do video recording, you might get more and better answers to video questions at a video forum. I'd look to, say, DVinfo.net. Maybe DVXuser.com. There are many others of course.
Are you asking about the audio subcomponent of the data stream, or the video quality?
Because the audio subcomponent is generally so small in comparison that many MP4 will have uncompressed or lossless 24/48 audio.
On the video side - what matters first in quality is the glass and the sensor behind it, and then what matters is the encoding chosen which is usually based on the silicon processing in the camera - the optimum choice will be the largest bandwidth that the sensor and encoding hardware and actually sustain. You can specify a higher bitrate and get NO increase in quality if the hardware can't support it. This is equivalent to feeding a Grace preamp/A-D running at 24/192 with a pair of SM-57s. You'll get LOTS of bits, but most of them will be wasted.