Heat the coconut milk with the sugar on medium-high heat until boiling. Remove from heat. Stir in the cornstarch, return to the stove on medium heat, and stir constantly for 3-5 minutes until thickened. Pour into a mixing bowl and let cool to room temperature, about 15 minutes.
Add the quark to the cooled coconut mixture and whisk until smooth and homogeneous. Let cool to room temperature, about 20 minutes, then refrigerate for 2-3 hours or overnight.
Puree the pineapple. Strain the puree through a sieve and mix with the powdered sugar. Add a splash of lemon juice if desired for extra tartness. Refrigerate for 2-3 hours or overnight.