Thanks for all the comments guys. Picking up on a few points...
I just got a best case spread (jitter?) of 27ms for my Roland and a worst case of 33ms to send 10 notes...
Using my rule of thumb, 20ms minimum perception time, that is unacceptable. And it's unnecessary as the technology has been around for a decade or more to do better. I think your point is very well made! I should also say that in any complex system where there are several sources of an unwanted effect that occur in series, the engineering solution is to attack the principal cause first. I think you've demonstrated clearly that MIDI delay is a, if not the, first order contributor to overall system delay.
Not all keyboards are 8x8
The beauty of doing this in something like an Arduino (or indeed any other software driven interface) is that it is quite straightforward to adapt for different matrix layouts. 8x8 is rather convenient and uses the fewest I/O pins (16 for one keyboard, 24 for two, etc.). If the keyboard doesn't have a matrix then it is relatively simple to make one with a bunch of cheap diodes on a piece of Veroboard.
...when each keyboard has it own encoder and DIN MIDI output, it is fairly easy to 'merge' these into one USB connection for the computer
Yes, it is. Aesthetically this is not pleasing to me as an engineer because there are two serial conversion processes - firstly to DIN MIDI and then to USB. Whether or not it causes problems, there is no need for this any more. Daisy chaining must, surely, be a no-no?
...particularly the expression pedal MIDI data...
I understand the issue with expression pedals causing floods of MIDI traffic but this is just poor design if it is allowed to happen. My approach is to sample the analogue input every 50ms (could probably be increased to 100ms) and send any update to the MIDI channel at that time. This means that at most there can be 20 (10) expression pedal updates per second which is perfectly fit for purpose.
I'm impressed with the level of interest and quality of debate on this! Thanks to all.