This problem is a generalization of another problem I have solved and I was wondering if this proof works out.
First of all, we know that continuous functions with compact support are dense in $L^1[0,1]$. Thus take such $m(x)$, then we know that there exists $f_n \to m$ uniformly $f_n \in A$. In finite measure uniform convergence implies $L^1$ convergence. Thus $f_n \to m$ in $L^1$. Now then by assumption $\int_0^1 f_n(x)g(x)=\int_0^1 f_n(x)h(x)$ for all $n$ and so by taking the limit, and moving it inside (which can be justified by DCT) we have that $\int_0^1 m(x)g(x)=\int_0^1 m(x)h(x)$. Now $m$ was an arbitrary integrable function, thus in particular $\int_A (g(x)-h(x))=0$ where $A$ is any measurable set, thus by a standard result $g(x)-h(x)=0$ a.e
A little more generally only $Span(A)$ has to be dense.