Make the fries: Brush a baking sheet with vegetable oil. Heat 2 to 3 inches vegetable oil in a Dutch oven until a deep-fry thermometer registers 365 degrees F. Meanwhile, bring a medium pot of salted water to a boil. Add the pasta to the boiling water and cook as the package directs, then drain. Spread in an even layer on the prepared baking sheet and let cool.
Cut the cooked spaghetti into short pieces and fry in batches, turning once, until golden, 30 seconds to 1 minute. Drain on paper towels and sprinkle with the parmesan and salt.
Make the burgers: Preheat the broiler. Pulse the onion, 4 garlic cloves, 1/2 cup basil and the parsley in a food processor until finely chopped. Transfer to a bowl and add the ground beef, 1/2 cup each parmesan and tomato sauce, the oregano, 1/2 teaspoon salt, and pepper to taste. Mix with your hands until combined and form into four 1-inch-thick patties. Transfer to a rimmed baking sheet.
Broil the patties, turning once, until browned and just cooked through, 6 to 8 minutes. Top each patty with a slice of mozzarella and 2 tablespoons of the remaining tomato sauce. Return to the broiler until the cheese melts, about 30 seconds.
Place the buns split-side up on another baking sheet and toast under the broiler until just golden, 1 to 2 minutes. Brush the toasted sides lightly with the olive oil, rub with the remaining garlic clove and sprinkle with the remaining 1/4 cup parmesan. Return to the broiler until the cheese melts, about 30 seconds.
Place each patty on a bun bottom and top with some sliced basil and a bun top. Serve with the spaghetti fries and warm tomato sauce for dipping.