Baked spaghetti pie with ricotta