I live in (greater) Boston at the moment, most of my best friends live in Philadelphia, so I've spent much time in both. If it's history you're after, Boston wears its Revolutionary history on its sleeve. You'll find it in abundance here. Philadelphia obviously also has plenty but, from my experience, it isn't as outwardly displayed as Boston.
As
>>2805554 mentioned a lot of Philadelphia needs cleaning up. If you visit stay in Center City or South Philly (they, while dirty, are the "least bad," I guess). In Boston you can turn any random corner downtown and find a historical site, just avoid the area called Downtown Crossing ("DTX") as it's just a shopping mall with a lot of sketchy characters.