Disentangled Representation Learning in Non-Markovian Causal Systems