I think logarithmic (rather than exponential) growth of the integral is to be expected. Assume that the quadrature scheme can exactly compute the integral everywhere except in the first element (near the singularity at x=0). Then we can write the numerical approximation of the integral, I, as the following (where L_e is the length of an element):
I = \int_0^1{\frac{dx}{dx}} = \int_0^{L_e} {\frac{dx}{x}} + \int_{L_e}^1 {\frac{dx}{x}}
The integral over the first element can be approximated numerically by transforming to an integral over the interval [-1, 1] (with x = L_e (\xi + 1)/2) and replacing with a sum over the quadrature points \xi_i and weights w_i:
\int_0^{L_e} {\frac{dx}{x}} = \int_{-1}^1 {\frac{d\xi}{\xi + 1}} \approx \sum_{i=1}^n {\frac{w_i}{\xi_i + 1}} = A
Note that this is a constant with no dependence on the mesh size. The remaining term of the integral can be integrated exactly:
\int_{L_e}^1 {\frac{dx}{x}} = \ln{1} - \ln{L_e} = - \ln{L_e}
Finally, making the substitution L_e = 1/N_e, where N_e is the number of elements, we obtain:
I = A + \ln{N_e}\,,
i.e. the approximation of the integral should grow logarithmically with the number of elements. Loosely speaking, this is much slower than a linear growth, and much much (= much²) slower than an exponential growth. This appears to match your results; running
import numpy as np
import ufl
from dolfinx import fem, mesh
from mpi4py import MPI
from petsc4py import PETSc
q = 10
Nx = 64
for Nx in range(10):
Ne = 2**Nx
msh = mesh.create_interval(MPI.COMM_WORLD, Ne, [0, 1.0])
dx = ufl.Measure("dx", domain=msh, metadata={"quadrature_degree": q},)
x = ufl.SpatialCoordinate(msh)
V = fem.FunctionSpace(msh, ("CG", 1))
v = ufl.TestFunction(V)
l = fem.form(1/x[0] * ufl.conj(v) * dx)
b = np.sum(fem.petsc.assemble_vector(l).array[:])
print(Ne, b)
produces
1 4.899999999999997
2 5.593147179886525
4 6.286294360445773
8 6.979441541005717
16 7.672588721565662
32 8.365735902125607
64 9.05888308268555
128 9.752030263245496
256 10.445177443805441
512 11.138324624365389
and plotting the results
import numpy as np
from matplotlib import pyplot as plt
data=np.array([[1,4.899999999999997],
[2,5.593147179886525],
[4,6.286294360445773],
[8,6.979441541005717],
[16,7.672588721565662],
[32,8.365735902125607],
[64,9.05888308268555],
[128,9.752030263245496],
[256,10.445177443805441],
[512,11.138324624365389]])
plt.plot(np.log(data[:,0]), data[:,1])
plt.xlabel("$\\log(N_{elem})$")
plt.ylabel("$\\int_0^1{dx/x}$")
plt.show()
gives

(The accuracy of the quadrature scheme outside the first element can be verified with the following code:)
import numpy as np
import ufl
from dolfinx import fem, mesh
from mpi4py import MPI
from petsc4py import PETSc
q = 10
Nx = 64
for Nx in range(1, 10):
Ne = 2**Nx
msh = mesh.create_interval(MPI.COMM_WORLD, Ne-1, [1/Ne, 1.0])
dx = ufl.Measure("dx", domain=msh, metadata={"quadrature_degree": q},)
x = ufl.SpatialCoordinate(msh)
V = fem.FunctionSpace(msh, ("CG", 1))
v = ufl.TestFunction(V)
l = fem.form(1/x[0] * ufl.conj(v) * dx)
b = np.sum(fem.petsc.assemble_vector(l).array[:])
print(Ne, b, np.log(Ne))