For the first problem, you have already detected where the problem lies: the variable $\phi$ is not a function defined on the whole manifold. Indeed, it is a priori a function in a chart on the manifold and a chart usually does not cover by itself the whole manifold.
On the other hand, the particular case of the torus is special because we can more or less canonically 'parametrize' the torus by $\mathbb{R}^2$ (which is its universal cover), for instance via the map $q: \mathbb{R}^2 \to \mathbb{R}^2 / \mathbb{Z}^2 \cong T^2$. As $\phi$ can be chosen to be one of two cartesian coordinates on $\mathbb{R}^2$, its derivative $d\phi$ (on the plane) is left invariant by any translation, in particular the ones by vectors in $\mathbb{Z}^2$. As such, $d\phi$ 'passes to the quotient' i.e. there exists a well-defined closed 1-form $\eta$ on $T^2$ such that $q^{\ast}\eta = d\phi$. This is another motivation to write $\eta = d\phi$, but note that $\phi$ itself would be a multi-valued function on the torus (and hence not a genuine function, so we wouldn't consider it as an antiderivative to $\eta$).
On the sphere, any chart misses at least one point, so again it is not surprising that one can find an antiderivative to a closed 1-form inside this chart. But if you can't extend $\phi$ and $\theta$ to the whole sphere, it is not clear how you can extend their derivatives to globally closed 1-forms in the first place: your problem possibly does not show up. Besides, the fact that the vector field $X = \partial/\partial \theta$ on the sphere can be globally defined (by rotation invariance and also by the null vectors at the poles) is not related to the (im)possibility that $\theta$ (or $d\theta$) is globally well-defined, but only to the fact that $X \lrcorner \omega$ is a closed (and exact) 1-form : an antiderivative is the height function, which is clearly not the angle 'function' $\theta$.
The obstruction to a symplectic vector field $X$ to be Hamiltonian is precisely whether the closed 1-form $X \lrcorner \omega$ is exact. In other words, does the cohomology class $[X \lrcorner \omega] \in H^1_{dR}(M; \mathbb{R})$ vanish? (The nonvanishing of this class is the obstruction to $X$ being Hamiltonian.) This question makes sense on any manifold; the point is that when $H^1_{dR}(M; \mathbb{R})=0$, then the answer is 'yes' whatever the symplectic field $X$. So on the 2-sphere, any symplectic vector field is Hamiltonian, whereas on the torus it depends on the symplectic vector field considered. Put differently, the (non)vanishing of the 1-cohomology group is the obstruction to the equality $Symp(M, \omega) = Ham(M, \omega)$.
My attempt at an answer using the help given by user3257842:
Let $\{ e_1(p),....,e_{2n}(p) \}$ be a basis for $T_p(M)$, orthonormal with respect to the Riemannian metric $\rho$. Define the representing matrix of $\omega_p$ to be $B(p)\in \mathbb{R}_{2n \times 2n}$, by: $ B_{i,j}(p):= \omega_p \Big( e_i, e_j \Big) $
We know that for two tangent vectors $\eta_{(1)}$ and $\eta_{(2)}$ we have:
$ \omega(\eta_{(1)},\eta_{(2)}) = \eta_{(1)}^t \cdot B(p)\cdot \eta_{(2)} $,
with coordinate vectors with respect to the above orthonormal basis.
For all $\eta\in T_p(M)$ we have that:
$ dH_p(\eta)= \rho( \nabla H(p), \eta ) $
And by our choice of basis, we have that:
$ dH_p(\eta)= \Big( \nabla H(p) \Big) ^t \cdot \eta $,
with the coordinate vectors with respect to our orthonormal basis.
Let us define $X_h(p)$ by:
$ X_H(p):=\Big( \nabla H(p) \Big) ^t\cdot \Big( B(p) \Big)^{-1} $
By this definition, we can see that:
$ \Big( X_H\Big)^t B(p)= \Big( \nabla H(p) \Big) ^t\cdot \Big( B(p) \Big)^{-1} \cdot B(p)=\Big( \nabla H(p) \Big)^t $
And therefore:
$ \omega(X_H(p), \eta)= dH(\eta) \quad \text{for all} \quad \eta \in T_p(M) $
This will be our Hamiltonian vector field.
Let us notice, that since $\omega$ is invertible and smooth, if we denote it's inverse $\omega^{-1}$, then it is also smooth. i.e, the entries of $\Big( B(p) \Big)^{-1}$ are also smooth as a function of $p$. And we obtain that $X_H$ is a result of a composition of smooth maps, and is therefore smooth.
Best Answer
I presume $j$ is an embedding.
Let $\xi_Y \in TY$ be the unique vector field with $j_*\xi=\xi_H$. You need to show (up to sign conventions) that for all $\eta$ tangent to $Y$ one has $[j^*\omega](\xi_Y, \eta)=[-d(j^*H)](\eta)=[-j^*(dH)](\eta)$ for all $\eta \in TY$; this is the same as $\omega(\xi_H, j_* \eta)=-d(H)(j_*\eta)$. But since $\xi_H$ is Hamiltonian vector field of $H$, this is true for all $\nu$ (tangent to $M$ at points of $j(Y)$), hence in particular for $\nu=j_*\eta$.
In the more traditional order of mathematical argument:
1) Since $\xi_H$ is Hamiltonian vector field of $H$, we have (up to sign conventions) for all $\nu$ tangent to $M$ at points of $j(Y)$
$$\omega(\xi_H, \nu)=-d(H)(\nu)$$
2) In particular the above holds for $\nu=j_*\eta$, where $\eta$ is any vector field tangent to $Y$. Plugging in we get
$$\omega(\xi_H, j_*\eta)=-d(H)(j_*\eta)$$
3) If we now define the vector field $\xi_Y$ tangent to $Y$ via $\xi_H=j_*\xi_Y$ (which we can, since $\xi_H$ is tangent to $j(Y)$ and any vector field tangent to $j(Y)$ is a pushforward of unique tangent vector field of $Y$), then the above becomes
$$\omega(j_*\xi_Y, j_*\eta)=-d(H)(j_*\eta)$$
or
$$(j^{*}\omega)(\xi_Y, \eta)=-d(j^* H)(\eta)$$
Since $\eta$ was arbitrary, we can write this as
$$(j^{*}\omega)(\xi_Y, \cdot)=-d(j^* H)(\cdot)$$
which precisely says that $\xi_Y$ is the Hamiltonian vector field of $j^* H$ with respect to the symplectic form $j^{*}\omega$, as we wanted.