In a 2-quart pan over medium heat, cook onion and garlic in butter until golden.
Add tomatoes (break up with a spoon) and their liquid, basil, oregano, and pepper; heat to simmering.
Mean while, combine Cheddar and Parmesan cheeses with cornstarch.
Reduce heat to low and add cheese mixture, a handful at a time, stirring until cheeses are melted and blended.
Transfer to fondue pot or chafing dish, and keep warm over heat source.