Line a 8-by-8–inch square cake pan with parchment paper; grease with butter, then set aside.
Whisk flour, baking powder, and salt in a bowl; in a large bowl, beat sugar, coconut oil, and butter on medium speed of a hand mixer until fluffy, about 3 minutes. Add eggs one at a time, beating after each addition until smooth. Add half the coconut milk and cream of coconut, then half the dry ingredients, and beat until just combined; add in remaining coconut milk and cream of coconut, plus the rosewater, mixing well to combine. Add remaining dry ingredients and mix well; fold in shredded coconut, then pour batter evenly into prepared pan. Cover with plastic wrap, then refrigerate overnight.
The next day, heat oven to 350°. Unwrap cake, then bake, turning halfway through, until golden brown, about 90 minutes. Cool cake completely before cutting and serving.