First, be aware that each input jack on the interfaces you are considering (and the vast majority of audio interfaces) is mono, not stereo. So you will need 4 input jacks just to plug in your two keyboards. Admittedly, it's not entirely helpful that in their marketing language companies will say "stereo line input" when what they really have is two mono line inputs that you can gang as a stereo pair, but that's the way it is.
The good news is that you can plug your keyboards into the XLR jacks. Any time you see an XLR jack referred to as a "combo" jack, as it is on these interfaces, that will normally indicate that you can plug a standard 1/4" jack into the center of it and use it as a line jack.
So, for your audio setup, the 2i4 is not going to have enough inputs, but the 6i6 should be enough.
Your MIDI plan sounds a bit odd. It sounds like you want to be able to daisy chain both keyboards to the MIDI ports on the audio interface. That is certainly doable, but the specifics of your plan probably won't work.
In particular, I doubt you will be able to chain one keyboard to the other using USB. If your keyboards actually support this, I want to know what they are! More likely, you will need to do your MIDI setup entirely with standard MIDI cables.
You will need 3 MIDI cables just to achieve a setup where one of your keyboards can both send and receive data with the computer (IN - OUT and OUT - IN between KB1 and the audio interface), and the other can receive data from the computer and/or the first keyboard (MIDI Thru on KB1 to MIDI IN on KB2).
The limitation in that setup is imposed by the MIDI Thru port, which is a one-way street. It's designed to send MIDI data from a controller to a sound module, not to support full two-way duplex communication where data is both coming and going. So you can have one keyboard as a controller, but not both.
To be able to use both as controllers, you will need an audio interface with 2 sets of MIDI In/Out ports, or a separate MIDI interface to support one or both of the keyboards. If you update your question with details of the keyboards you have and the objectives you want to achieve with your MIDI setup, I'll adjust my answer accordingly.