Why only shared resistances are taken into consideration while computing Elmore delay?
Because, by definition, the (shared) path resistance(s) determines the path delay. So, resistors not on the path from root to sink are not taken into account.

Check the slide "RC tree definitions" in this slide show.
(\$ A \cap B \$ means the set that contains all those elements that A and B have in common.)

The solution in the slide is:
$$ \tau_{Di} = \sum^{N}_{k=1} C_k \cdot R_{ik} =$$
$$ C_1 \cdot R_1 + C_2 \cdot R_1 + C_3 \cdot (R_1+R_3) + C_4 \cdot (R_1+R_3) + C_i \cdot (R_1+R_3+R_i)$$

Note that using the definition given on the wiki, "summing the delays through each segment as the R (electrical resistance) times the downstream C",  gives the same result.
$$ R_1 \cdot (C_1+C_2+C_3+C_4+C_i) + R_3 \cdot (C_3+C_4+C_i) + R_i \cdot C_i $$