Heat the oven to 275°F, mix the spice rub in a small bowl, and line a large rimmed baking sheet with foil. Keep the pan ready before handling the ribs so the seasoned meat can go straight onto the foil.
Check the bone side of each rack for the white membrane, remove it if present, then pat the ribs dry and inspect for small bone fragments before cutting into pieces of 4 to 6 ribs. A dry surface helps the seasoning stay put rather than sliding off.
Coat both sides of the rib pieces with the spice mixture, or season them with salt and pepper if skipping the rub. The meat should look evenly covered, with paprika and brown sugar visible across the surface.
Arrange the ribs meat-side down on the prepared pan and scatter the sliced onions and garlic over them. The aromatics will soften and release a savory scent as the pork cooks.
Lay another sheet of foil over the pan and seal the edges tightly to enclose the ribs. The packet should hold steam inside without loose openings around the rim.
Bake for 2 hours, then carefully open one corner of the foil and pull off a small piece of meat to test tenderness. If the meat still feels firm or clings tightly to the bone, reseal the packet and bake for another 20 to 30 minutes before checking again.
Stir the barbecue sauce, chili sauce, and ketchup together while the ribs finish baking. The mixture should be smooth and thick enough to coat the back of a spoon.
Remove the ribs from the pan, discard the cooking juices, onions, and garlic, then brush the ribs with olive oil followed by a generous coating of sauce. The surface should look fully glazed before it goes under high heat.
Broil or grill the ribs over medium-high heat for 5 to 10 minutes, until the edges char lightly. Watch closely as the sauce bubbles and darkens into a fragrant, glossy coating.