Make the rice. Combine the rinsed rice, coconut milk, 1 cup water, pandan, ginger and 1/2 tsp salt in a pot or rice cooker. Cook as you normally cook jasmine rice, then rest covered 10 minutes and fluff.
Press the tofu between clean towels under a heavy pan for 15 minutes, then cut into 2 cm cubes and toss with the cornstarch.
Blitz the soaked chilies, shallots, garlic and belacan with a splash of the soaking water into a coarse paste.
Heat 1 tbsp oil in a small pan over medium heat. Fry the anchovies 2 to 3 minutes until golden and crisp, then lift out onto paper towels. Toast the peanuts in the same pan for 1 minute if they are not already crunchy.
Heat 1 tbsp oil in a large nonstick skillet over medium-high heat. Fry the tofu in a single layer, turning, 8 to 10 minutes until golden on most sides. Remove to a plate.
Add the last 1 tbsp oil to the skillet over medium heat. Cook the chili paste 6 to 8 minutes, stirring, until it darkens and the oil separates at the edges. Stir in the tamarind, sugar and 1/2 tsp salt, plus 2 tbsp water.
Return the tofu to the skillet and toss 1 to 2 minutes until the sambal clings and turns sticky. Taste and add a pinch of salt or sugar if needed.
Divide the rice among four bowls. Top each with sambal tofu, 4 egg halves, cucumber, anchovies and peanuts. Serve warm.