EmulationStation and Retroarch detects well the gamepad but I can’t use it to control de Kodi menus. With a PS3 dualshock I control it without problems.
That, last screenshot looks like where you wanted to be.
When you say the controller works with EmulationStation and Retroarch do you mean it worked when you had EmulationStation and Retroarch installed on the same device that you now have CoreELEC installed on. Or do you mean it worked on another device running EmulationStation and Retroarch?