I don't think I would ever buy a Raffle: sometimes I'll get a Goons and sometimes a Curse, so either it's very good or very bad or anything in-between. And because it's a gainer, it's an early game card, and unpredictable early game cards aren't very good (see Treasure Map). Also, it's statistically worse than Workshop (gaining cards costing up to $3.5 on average), though that doesn't necessarily mean it should cost less than Workshop because gaining $5s and $6s sometimes is possibly more important than always gaining $4s.
Lottery on the other hand is a fine card IMO. It's a late game card, so you can buy it and hope you get 6VP if you're about to lose, or you can ignore it and go for Duchies instead if you're about to win. Also, it makes games more exciting and reduces rage quitting. It's also correctly priced at $6, because on average, it's 0.5 VP better than Duchy.