Dont know about Costa but MSC will have 2 gal dinners with formal dress on a 7 day cruise. They also have fixed times for dinner eg 1st or 2nd sitting, although I think you can choose to eat in the more informal 9cafe style) places instead of dinner in the dining room.
MSC is generally much less formal these days. Even on gala nights there are some who don't even wear suits. Yes they do have fixed times for dinner but Musica has other restaurants where you can go when you please but you have to pay a small charge. But I am told that they are worth the extra. The food on MSC is generally excellent.