Spaces of generalized smoothness on $h$-sets and related Dirichlet forms