A now-ubiquitous American comfort food has its origins in pasta dishes that have evolved over centuries.