I would suggest getting an older used mountain bike from a quality brand (something sold at bike shops - trek, specialized, raleigh, kona, gary fisher etc.), switching the knobby tires for slick tires. I would add a rear rack with a folding wald basket (fits a paper grocery bag perfect). Ideally look for a bike with a rigid front fork. Suspension forks aren't needed if you aren't riding rough trails, and are harder to mount racks and fenders to than rigid forks.
This should fit all your requirements:
- cheap - used mountain bikes are abundantly available on craigslist, and ones suitable for a few miles of in town riding (decent mechanical condition and quality parts, but older and without all the trail specific features real mountain bikers want) can be found for less than $100 in many locales.
- hills - mountain bikes have lots of gears, including easy ones for hills and trailer pulling
- trailering and carry groceries - sturdy frames, can handle this no problem. To make rack mounting easier, look for bikes with eyelets on the frame that let you easily mount racks with bolts, that way you won't need to mess around with p-clamps.
As far as brands, when you see a likely looking bike on craigslist, just do a quick google search to check if the brand is a bike shop brand or a big box store brand, and only buy bike shop brands. The only one that's a little tricky is Schwinn cause they've been sold a few times - recent schwinns (last 15 years?) are mostly big box store bikes you should avoid, while older schwinns (90s and older?) are decent bike shop bikes.