Cook the ground beef, onions, and garlic in a large pot over medium-high heat until the beef is no longer pink. Drain excess fat.
Add the pasta sauce, diced tomatoes with their juices, tomato paste, Italian seasoning, bay leaves, water, and green pepper if using. Season with salt and black pepper.
Cover and simmer for 15 minutes, stirring occasionally.
Stir in the uncooked macaroni. Cover and continue simmering for about 20 minutes, stirring occasionally, until the pasta is tender.
Remove and discard the bay leaves. Taste and adjust the seasoning.
Sprinkle the cheddar over the goulash, cover, and let it stand for about 5 minutes, until the cheese melts. Serve hot.