I'm interpreting your question as follows: when you write $H = \pi_1(Y,\ast)$, you mean the inclusion $i:Y\rightarrow X$ induces an injective map on $\pi_1$ with image $H$. (As opposed to $\pi_1(Y)$ being abstractly isomorphic to $H$).
With this interpretation, the answer is no. For example, consider $X = S^1$. It is well known that $\pi_1(X) = \mathbb{Z}$. Now, consider the subgroup $H = 2\mathbb{Z}$. I claim that there is no proper subspace $Y$ for which which has this fundamental group.
We may assume wlog that $Y$ is connected. Then note that any connected proper subset of $S^1$ is homeomorphic to a connected subset of $(0,1)$. These are easy to classify, they are, up to homeomorphism, $(0,1)$, $[0,1]$, and $(0,1]$. None of these has infinite cyclic fundamental group.
Edit Here is an example with $H$ not even abstractly isomorphic to a particular subgroup of $\pi_1(X)$.
Take $X = S^1 \vee S^1$, the wedge sum of 2 $S^1$s. The fundamental group of $X$ is known to be isomorphic to the free group on two generators. It's also know that a free group on two generators contains subgroups isomorphic to the free group on $n$ generators for any finite $n$ (we make even take $n$ to be countable). Further, it's know that free groups on different numbers of generators are never isomorphic.
Let $H$ denote any of these subgroups for $n > 2$. In particular, $H$ is not isomorphic to either $0$, $\mathbb{Z}$, or the free group on two generators. I claim that no subspace $Y$ of $X$ has $H$ as a fundamental group, even up to abstract isomorphism.
As above, we may assume $Y$ is connected. If $Y$ does not contain the wedge point, then it must be contained in a proper portion of one of the two circles, so the above argument shows $\pi_1(Y)$ is trivial. Hence, $Y$ must contain the wedge point. Now, if $Y$ does not contain the whole of the first circle, then $Y$ deformation retracts onto a subspace of the other circle, hence, by the previous argument has $\pi_1 = 0$ or $\mathbb{Z}$. Thus, $Y$ must contain the while first circle. Likewise, $Y$ must contain the whole second circle.
But then this implies $Y = X$, so $Y$s fundamental group is isomorphic to the free group on $2$ generators, so not isomorphic to $H$.
Final (?) Edit Here's one in the finite fundamental group case. Let $X$ be obtained from $S^1$ by attaching a $D^2$ by a degree $4$ map. A simple van Kampen argument shows $\pi_1(X) = \mathbb{Z}/4$. Let $H$ be the unique subgroup of $\pi_1(X)$ isomorphic to $\mathbb{Z}/2$.
I claim that no subspace $Y$ has fundamental group abstractly isomorphic to $H$. If $Y$ misses a point of the interior of the $D^2$, then $Y$ deformation retracts onto a subspace of $S^1$, so by the above argument, has $\pi_1 = 0$ or $\mathbb{Z}$. Hence, we may assume wlog that $Y$ contains all of the interior of $D^2$. Likewise, if $Y$ misses a point of $S^1$, then restricting the van Kampen argument to $Y$ shows that $\pi_1(Y) = 0$, so $Y$ must contain all of $S^1$. This implies $Y = X$, so $\pi_1(Y)\neq H$.
If $M$ is a manifold and $\hat M$ its universal cover, $\hat M$ is endowed with a differentiable structure such that $p:\hat M\rightarrow M$ is differentiable. For every $x\in M$, there exists a neighborhood $U$ of $x$ such that $U$ is a domain chart $\phi:U\rightarrow\mathbb{R}^n$ and $p^{-1}(U)=\bigcup V_i$ and $p_{\mid V_i}\rightarrow U$ is an homeomorphism, the differentiable structure is defined by supposing that $p_i$ is a diffeomorphism which induces the chart $\phi\circ p_i$ on $\hat V_i$.
Now look at the action of an element $\gamma\in\pi_1(M)$ on $\hat M$, i.e. a covering transformation. We will prove that this action is already smooth. Let $p(y)=x$. There exist $i$ and $j$ such that $y\in V_i$ and $\gamma . y\in V_j$,
However, the map $(\phi\circ p_j) \circ \gamma \circ (\phi\circ p_i)^{-1}$ is the identity, this implies that action of $\gamma$ is differentiable.
This proves that every covering transformation is smooth.
Best Answer
Assume $M$ is not orientable. We then have that the orientable double cover $\widetilde{M}$ of $M$ is path-connected.
For a path-connected covering $f: \widetilde{M} \to M$, it is well-known that the number of elements on a fiber is given by the index of $f_{\#}(\pi_1(\widetilde{M}) )$ on $\pi_1(M)$*. It follows that $f_{\#}(\pi_1(\widetilde{M}) )$ is a subgroup of index $2$ (since we have a double cover), a contradiction.
*Let's prove this assertion. For this, note that $$f_{\#}(\pi_1(\widetilde{M},p) )=\{[c]\mid c \text{ is a loop in } f(p) \text{ which lifts to a loop in } p\}.$$ Thus, $ f_{\#}(\pi_1(\widetilde{M},p) )$ is precisely the isotropy of the point $p$ with respect to the action of $\pi_1(M,f(p))$ on the fiber which contains $p$, which takes $\alpha \in \pi_1(M,f(p))$ and $p'$ in such fiber and takes them to where the lift of $\alpha$ which begins on $p'$ ends.
You can verify that this is indeed a group action. It is also transitive, and this is where path-connectedness is important. Now, it is an easy exercise to verify that $$\pi_1(M,f(p))/f_{\#}(\pi_1(\widetilde{M},p) ) \to F_{f(p)}$$ $$[c] \mapsto [c] \cdot p $$ is well-defined and is a bijection, where $F_{f(p)}$ is the fiber that contains $p$ (this is an algebraic exercise).