Shuffle algebras, lattice paths and the commuting scheme