Cook the pasta according to the package directions; drain and return it to the pot.
Meanwhile, heat the oil in a large skillet over medium-high heat. Add the onion, garlic, and ½ teaspoon each salt and pepper. Cook, stirring occasionally, until the onion begins to soften, 3 to 5 minutes.
Add the beef and cook, breaking it up with a spoon, until browned, 3 to 5 minutes.
Add the tomato paste and cook, stirring, for 30 seconds. Add the tomatoes, ½ teaspoon salt, and ¼ teaspoon pepper and cook, stirring occasionally, until beginning to soften, 5 to 7 minutes more (add up to ¼ cup water if the pan is dry).
Add the beef mixture, bocconcini, and basil to the pasta and toss to combine.