Quantum Floquet engineering with an exactly solvable tight-binding chain in a cavity