How do solve assignment of one interval to another?
This is an instance of bipartite matching (i.e., the assignment problem with no costs).  It can be solved by standard methods, such as network flow algorithms (e.g., Ford-Fulkerson), the Hopcroft-Karp algorithm, or using linear programming.  See also https://cs.stackexchange.com/a/61264/755.

In particular, you can build a bipartite graph, with one "left vertex" per peg, and one "right vertex" per hole, and an edge from peg $p$ to hole $h$ if the interval $p$ is contained in the interval $h$.  Compute the maximum cardinality matching for this bipartite graph.  If this matching covers every hole, then  the answer to your problem is "yes", otherwise the answer is "no".