Nematicity-enhanced superconductivity in systems with a non-Fermi liquid behavior