It's good you are okay with avoiding the beaches, because that's obviously where most of the crowds will be.
Budapest is a great city for seeing architecture, outdoor eating, relaxing in the indoor/outdoor thermal spas, river walks, etc. Prices can be cheap or high, depending on where you're at in the city. The area around the embassies are expensive (Andrassy street). This city is my top suggestion for you based upon the info you provided. However, here are some other ideas:
If you want to stay/eat for really good prices, then Eastern Europe is the best for that aspect. Smaller places in Romania, Hungary, and Bulgaria can be very cheap (ex: $4 for a dinner). Sibiu, Brasov, Sofia, etc. are particularly interesting and not very popular for tourists yet, but that might be a long trip depending on layover requirements.
Switzerland is very expensive in general, but there are actually really nice hostels in some areas that are cheap. One could fly to Milan or Zurich and take a train to a place like Interlaken, and use that as your hub for visiting the nearby villages (Lauterbrunnen, Grindelwald, Murren, etc) in the alps. Hiking is great in August, but you would likely want to cook most of your meals if you chose this option due to the high costs of restaurants. Most of the hostels have common cooking areas which are fun to use.
Northern Italy has quite a few airports that you can fly to for good prices. You can use commuter trains or a rental car to visit a lot of countries/towns within a few hours. If you avoid the huge tourist locations, then prices can be quite good. I'm going to be living at Lake Garda starting in 2 weeks, so let me know if you go to this part of Europe and I might have a place for you to stay for free.
Portugal and Spain have good prices as well and plenty of cool architecture/food, but several of their top locations will be crowded (ie, Lisbon, Barcelona).
Last, I've heard Krakow is really nice and cheap from some very well traveled people... but I haven't been there myself.
FYI -- I lived in Europe for over 3 years and travel on a frequent basis.