Mix brown sugar, pepper, salt, garlic powder, mustard powder, ground ginger, onion powder, red pepper flakes, cayenne pepper, cumin, paprika, and thyme in a bowl. Rub spice mixture over pork loin and wrap tightly in plastic wrap. Place pork on a 9x13-inch baking dish and refrigerate for 4 hours to overnight.
Preheat the oven to 350 degrees F (175 degrees C). Remove plastic wrap from pork and discard; return pork to baking dish.
Bake in the preheated oven until pork is slightly pink in the center, about 50 minutes. An instant-read thermometer inserted into the center should read at least 145 degrees F (63 degrees C). Cover pork loosely with aluminum foil and let rest for 10 minutes before slicing.