You don't have to spend a night in Milan. If you're coming from Varenna on Lake Como, then a train departs there about 5:30 a.m. to get to Nice at noon or departs about 8:30 to get to Nice at 16:00. If you're staying at Como town, then trains depart San Giovanni station about 5:50 and 9:50 to meet the same connections in Milan. Give the extra night to one of the other big cities.
If skipping Lake Como, then the 8:20 train from Venezia S Lucia would also connect with that second train to Nice. Or save 8 hours on the train and fly EasyJet nonstop Venice-Nice from $40. Near Nice, Villefranche might be the small-town substitute for the Lake Como experience.