Hey there! Funny timing... I was thinking just the other day about how much I've spent total on 8+ years of dog ownership ... probably in the neighborhood of $2500, I would say, including initial acquisition of $450. For 8 years of learning and fun, I consider that well worth it. Others would consider that outrageous, and that's fine. Of course, this rumination came after the spending of $250 to deal with the repercussions of a severely ripped dew claw, so there you go... :)
A few thoughts:
The size and/or breed will make a BIG difference in how much money you spend. I have a Corgi, which has been perfect for me -- small enough to fit easily in studio apartments when that's where I was living, doesn't eat too much food, travels easily, etc. But big enough to go hiking, not be too delicate, etc. I've been pretty lucky with very minimal vet bills (so far! knock wood). Researching breeds and their various potential health problems is a great idea. Corgis, for example, are notorious for having bad backs later in life. I've been careful to keep my guy a healthy weight and active so he has strong muscles and bones because of that, we'll see how it works out when he reaches senior citizen status.
YES to the training -- not only will it make their quality of life so much better, because they will be welcome more places and calmer when they are out and about, but it will make your life a LOT easier in the long run. I got my dog as a puppy, and I would really emphasize to not overlook the amount of time and energy this will take for the first year + of life -- a LOT of time and energy. But, then you're reaping the rewards for the rest of the dog's life. I did a mix of books and classes. Classes are great for socialization for the dog and for hands-on instruction for YOU, if you're new to pet ownership like I was. An experienced trainer can give you a great model for how to effectively handle dogs that no book ever could. But, I don't think you have to do a lot of classes, and they weren't horribly expensive -- again, investment.
No matter what age dog you get, get this book: My Smart Puppy by Sarah Wilson. Silly name, I know, but it has the BEST hands-on training exercises that make real-world sense and make a real-world difference in your relationship with your dog (any age, not just puppies). I have read many, many dog training books, and this was the hands down winner.
Vet costs vary a lot by where you're located. I got my dog in Wyoming, where vet services are dirt cheap, due to the pets-are-more-like-livestock, not family members, general prevailing attitude there. In Seattle, where I live now, vets are expensive, but some are outrageous and some are more reasonable. Do your research, cost compare, etc.
I get a mid-range dog food from the pet food store, but I'm not overly concerned with keeping costs as low as possible there because he doesn't eat that much. (We go through a 15-lb bag every... two months ish, at $30/bag.) I have heard great things about Costco's pet food, too. Totally agree with the other poster that more expensive doesn't equal better.
A couple of toys are nice to have around, and certainly if your dog is entertained by chewing (mine isn't a chewer), a high quality chew toy is a lot cheaper than replacing floors, couches, etc! But for us, at this point in his life, the dog really needs a tennis ball or two, his food-dispensing toy (LOVE this genre of toy), a leash, a collar, flea preventive in the summer, a crate, a pad for the crate... that's about it. I got him a bed once, but he's on the hardwood floors or the couch 98% of the time. Just realize that most pet purchases are actually for the owner! That's always a good reminder whenever I'm tempted at the pet store: does he need this? will he care? No. Do YOU need this? No. Okay. Put [insert name of cute toy here] down, and walk away...
If you get a puppy, I would recommend having dew claws removed (see above).
Good luck! And good for you for thinking about all of this in advance. Dogs are fun, and they don't have to be expensive.