Preheat oven to 325 degrees Fahrenheit.
Season pork shanks with salt and pepper then sear in a heavy Dutch oven with vegetable oil over medium-high heat until browned on all sides.
Whisk together pineapple juice, soy sauce, brown sugar, rice vinegar, ginger, garlic, and red pepper flakes in a small bowl.
Pour the liquid mixture over the shanks and add the star anise to the pot.
Cover and braise in the oven for 3 hours or until the meat is tender and pulling away from the bone.
Remove shanks from the pot and keep warm.
Strain the remaining liquid into a saucepan, add pineapple chunks, and bring to a simmer over medium heat.
Whisk in cornstarch slurry and cook for 2 minutes until the glaze is thickened and glossy.
Brush the glaze over the shanks and serve immediately.