On certain boundary value problems for second-order linear ordinary differential equations with singularities