Hardware USB keyboard layout switch (f.e. Qwerty<->Dvorak)

blengon:
Is it possible? What could be a problem?

Sounds quite possible, however you don't need a keyboard encoder (which is going to be very difficult to interface) if instead you use a Pro Micro (Leonardo variant) which can implement a HID class in itself. This may still fit the "Mini" USB host shield (haven't looked at the connections).