Dude, if you're gonna have so much pasta, all those carbs, you gotta burn it off. Go running, lift weights, play an hour or two of tennis or something. Otherwise, it's gonna turn to fat
And definitely don't eat right before going to bed, that's the worst. But also make sure you don't go to bed starving, as that is also unhealthy.
Me, I like to eat a good hour or two before bed, and when I wake up, I've lost more than when I don't eat at all.
If it's under the basic consumption, then it won't turn to fat.
Cooked pasta has around 100 calories per 100 grams. So you'd have to eat 2kg of it to get 2000 calories.