I'm a big city girl in my late 30s who also loves museums and history, so make of my recommendations what you will!
London: Probably my favorite city in the world (so far). It's expensive, but it gives me that feeling of amazement that I expected to feel in Manhattan and just never did. It's expensive, but most of the museums are free and Ah-may-zing. I've been 4 or 5 times and I would return in a heartbeat. Great food scene, too. And Londoners are surprisingly friendly. Medieval/Renaissance English history was my first big love and if you're into that, there's no way London will disappoint. You might also want to take the train up to York, it wears it's medieval history on its sleeve but still has the feel of an active university city.
Amsterdam: I had no major interest in it but we ended up going on a lark due to good airfare, and well, we returned 3 more times that year (the cheap airfare helped, but we really fell in love with it.) People who don't like it, in my experience, stayed in the crowded tourist center. If you go, stay in the Jordaan, it's absolutely perfect and so beautiful and doesn't have the drug/sex scene that you find in the center. The museum scene there is just behind London and Paris, especially if you're like me and love the Dutch masters. The cool thing about the NL is everything is very close so it's very easy to catch a 20 minute train to Haarlem (Frans Hals museum may be my favorite small art museum so far). Locals are also pretty friendly and the search for a favorite brauncafe is a fun evening activity. Plus, I mean, a little bit of marijuana can be fun, too...it doesn't have to be a seedy experience. You can hit up the coffeeshop "Abraxas" and then enjoy some bitterballen on the canal boat bar P96 in the sunshine...heaven.
Madrid: I wanted to like it more than I did. I was also on a girl's trip and there was some social friction which may have contributed, but I'm not the only person I know who was underwhelmed. The tapas scene is really cool, and if you do your research you can eat very well for the cost of a small beer in tons of places. I got out to one of the more gritty suburbs on my last day and had a more fun urban experience, the modern art scene there is quite happening. The Prado is fantastic and is the reason I would suggest trying to visit as part of a larger trip to Spain/Portugal, but I don't think you'd need more than 2-3 days in Madrid to feel like you've seen the important stuff.
Budapest: I've been twice and I like it, but some people here really love it. It's got a distinct atmosphere, ruin pubs are fun, the museum scene is a bit less exciting, but it's a great place to visit for a couple days, especially combined with Vienna.
Vienna: VERY underrated in my opinion, based on two visits. It really does feel like the "Paris" of Austria, due to the moments and palaces throughout the city, beautiful churches, and world-class museums. It's also got a hip youthful vibe outside of the tourist center. And the history aspect is amazing if you're at all into the Holy Roman Empire/Austro-Hungarian empire/WWI. Seeing the car that Franz Ferdinand was shot in and his uniform at the military museum gave me chills.
Prague: it's probably the most beautiful city I've been to, but it's hard to escape the tourist crush in the summer. I've been in May and early June and it was pretty crowded both times. The museum game isn't top notch compared to stuff listed above, but still worthwhile. Totally doable as part of a Budapest/Vienna trip.
Lisbon: Haven't been yet but everyone I know who's gone to Portugal has raved about it. Hoping to go soon. Some people prefer Porto but it's not like they're far away from each other. Hope this was helpful!