The Giant has a freewheel hub, which is a poorer design than the 8-speed cassette hub on the Trek.
For utility riding, get a utility minded bike. Apart from gears, to me that means fenders and a rack.
Me, I'd look for a disc brake bike for a commuter. Better performance in rain, takes less hand effort. If you keep adding mileage, your rims last longer.
Don't buy a bike with upgrades already in mind.
Bike parts are a lot more expensive when bought piecemeal than when bought bolted to a bike.
A thorough upgrade at shop prices will cost considerably more than buying the bike you want in the first place.
A better option if you want to start "cheap" is to go for a second bike. Your first bike becomes the rain, or the backup bike. Maybe even the winter bike if you live someplace where winter actually means something.