Bacterial swimming in flow near surfaces is critical to the spread of infection and device colonization. Understanding how material properties affect flagella- and motility-dependent bacteria-surface interactions is a first step in designing new medical devices that mitigate the risk of infection. We report that, on biomaterial coatings such as polyethylene glycol (PEG) hydrogels and end-tethered layers that prevent adhesive bacteria accumulation, the coating mechanics and hydration control the near-surface travel and dynamic surface contact of E. coli cells in gentle shear flow (order 10 s-1). Along relatively stiff (order 1 MPa) PEG hydrogels or end-tethered layers of PEG chains of similar polymer correlation length, run-and-tumble E. coli travel nanometrically close to the coating's surface in the flow direction in distinguishable runs or "engagements" that persist for several seconds, after which cells leave the interface. The duration of these engagements was greater along stiff hydrogels and end-tethered layers compared with softer, more-hydrated hydrogels. Swimming cells that left stiff hydrogels or end-tethered layers proceeded out to distances of a few microns and then returned to engage the surface again and again, while cells engaging the soft hydrogel tended not to return after leaving. As a result of differences in the duration of engagements and tendency to return to stiff hydrogel and end-tethered layers, swimming E. coli experienced 3 times the integrated dynamic surface contact with stiff coatings compared with softer hydrogels. The striking similarity of swimming behaviors near 16-nm-thick end-tethered layers and 100-μm-thick stiff hydrogels argues that only the outermost several nanometers of a highly hydrated coating influence cell travel. The range of material stiffnesses, cell-surface distance during travel, and time scales of travel compared with run-and-tumble time scales suggests the influence of the coating derives from its interactions with flagella and its potential to alter flagellar bundling. Given that restriction of flagellar rotation is known to trigger increased virulence, bacteria influenced by surfaces in one region may become predisposed to form a biofilm downstream.