Santa Clara University is suburban, adjacent to San Jose, and a train ride from SF.
Depends a bit on your definition of city and exactly how near you want (and also depends on your definition of traditional campus… like UCSD is a self-contained campus but more sprawling than the standard green quad and brick buildings) but a couple that I didn’t notice being mentioned yet-
UC San Diego - not downtown, but in the general urban area.
UC Irvine - it’s more suburban than urban but within the overall huge LA metro area
Creighton (Omaha)
UC Berkeley - green campus surrounded by an urban area and then about a 20 minute subway ride to San Francisco
Loyola Marymount; University of San Francisco; University of Portland (all Catholic but open to everyone)
and I think these were mentioned but just in case I’m misremembering - Wash U (green, self -contained, St. Louis, edge of the city area); Tufts (Boston area); Willamette (small LAC in downtown Salem, OR - green campus across the street from the state capitol); Reed (LAC in Portland - more suburban area but not too far from downtown); Lewis and Clark (also Portland Oregon and also more suburban but you can get downtown); Brown (might be more urban than you want - central campus has green areas but the outer areas blend into the city of Providence, RI); Occidental (residential neighborhood of Los Angeles); the Claremont Colleges (Pomona, Scripps, Claremont McKenna, Pitzer, Harvey Mudd) - again, suburban, but in the greater LA area so lots of things to do.
Wake Forest. Requirement to live on campus for three yrs. Most live on all four yrs. Winston - Salem is a cool town about 10 minutes away via shuttle.
In Chicago, Northwestern (in Evanston, but definitely part of the Chicago scene), UChicago, and Loyola would fit your criteria. Also, if you’re looking for smaller schools, maybe Lake Forest (although it’s not really “part” of Chicago the way the other schools would be.) DePaul’s campus is less separated from the surrounding area, but it’s in a great part of the city. IIT and UIC are fine schools but suffer from SAD (Seventies Architecture Disorder), IMO.
I was recently in the Twin Cities and spent some time around Macalester, St. Thomas, and Concordia and found the “vibe” in that part of St. Paul very cool.
Other schools outside our area that may fit the bill and that D liked include Vandy, WUSTL, Rice, Brown, Tufts, Emory, and Tulane. Rochester is not a “large” city, but UR was the school that ultimately became my daughter’s first choice and we find the Rochester to be a city that is interesting and underappreciated.
Fordham
Samford University(Birmingham)