We explore the effect of inhomogeneity on electronic properties of the two-dimensional Hubbard model on a square lattice using dynamical mean-field theory (DMFT). The inhomogeneity is introduced via modulated lattice hopping such that in the extreme inhomogeneous limit the resulting geometry is a Lieb lattice, which exhibits a flat-band dispersion. The crossover can be observed in the uniform sublattice magnetization which is zero in the homogeneous case and increases with the inhomogeneity. Studying the spatially resolved frequency-dependent local self-energy, we find a crossover from Fermi-liquid to non-Fermi-liquid behavior happening at a moderate value of the inhomogeneity. This emergence of a non-Fermi liquid is concomitant of a quasiflat band. For finite doping the system with small inhomogeneity displays d-wave superconductivity coexisting with incommensurate spin-density order, inferred from the presence of oscillatory DMFT solutions. The d-wave superconductivity gets suppressed for moderate to large inhomogeneity for any finite doping while the incommensurate spin-density order still exists.