If you are looking for affordability, Brazil is the better choice,
requiring $1,500/mo compared to Costa Rica's
$3,000.
However, if you lack monthly income but have savings, you should choose Brazil, which explicitly allows asset-based qualification.
For tax optimization, Costa Rica is superior due to its "0% on Foreign Income" status.