I currently have 4 bettas in tanks of a similar volume to the second one posted. Each very healthy and active (which most call for a "happy" fish-i never call my fish happy-that is giving emotion to the fish...health and activity/behavior is what should be considered).
I agree it comes down to understanding water chemistry and good husbandry practices. I would not suggest new fishkeepers use smaller housing tho. Larger tanks are easier to start with until you understand the fundamentals, or you do run the risk of illnesses such as finrot if you dont stay on top of water quality. Larger volumes are easier to work with for a beginner as they are more forgiving with water chemistry (ie you can miss a waterchange without ill effects, generally), but small tanks are just fine for bettas once you understand the basics and feel comfortable with your fishkeeping abilities.
For a beginner, 3-5 gal is what I would recommend...until you get your feet wet (so to speak).
Cheers