Is that $20 or €20? If it's the latter, that's $24.50 today. The vignette at CHF 40 would be $41.50.
If you are from the USA or Canada, don't forget the requirement to have an International Drivers Permit for each driver. It's not a big expense, but inflates the cost of driving a bit more.
And if you plan to return the car in Switzerland, there will be a substantial drop off fee.
When you add up all the pieces, renting a car may not be cheaper than taking the train after all.
As an example, on Trenitalia I'm finding Milano Centrale to Como S. Giovanni 27.90€ for 3 adults on EuroCity trains with no train changes. That's 9.30€ per person and appears to be a walk-up price. It's the same for 9 April as for 8 May as for 5 June. The trip takes 46 minutes.
I'm also finding Como S. Giovanni to Lugano with no changes, 3 adults for 60€ on 9 April. The trip takes 37 minutes. On 8 May and on 5 June the price stays the same.
Assuming a return from Lugano to Milano Centrale, the price is 72 € for no changes on 9 April and 8 May. 5 June isn't loaded yet. The trip takes 1 hr, 15 min.
I did see a 3 for the price of 2 ad on Trenitalia. That might be worth checking out.