I'd just like to point out that Chicago is an actual city, while Boston is essentially a large town with pretensions.
Here's the Onion's commentary...
<ducks and hides>
That said, if you're specifically interested in American history, Boston is the no-brainer choice. But in terms of everything else, Chicago has Boston beat cold.
Museums? Chicago wins with the Art Institute, Museum of Science & Industry, Museum of Contemporary Art, and a few others.
Food? Chicago has everything in quantity and quality. Every ethnicity and style, from down home to three star Michelin restaurants.
I'd also highly recommend an architectural boat cruise.
In terms of public transport, I think you'll be fine in either city.
If you plan on going to NYC before or after, I wouldn't worry too much about it. There are multiple flights per hour between NYC and Chicago, and between Boston and NYC. Boston has the advantage of train connections too.