This solution is working (as long you not tired to repeat the pattern) but not as efficient as one suggested by @BERA
There is a possibility using a "Virtual Layer" through Layer > Add Layer > Add/Edit Virtual Layer...
Let's assume there are polyline layers called 'lines_test'
and 'lines_test2'
.

With the following query, it is possible to end up with a table of lengths for all polyline layers.
SELECT "lines_test" AS Layer,
COUNT(*) Features,
round(SUM(ST_length(geometry)), 6) AS Sumlength
FROM "lines_test"
UNION
SELECT "lines_test2" AS Layer,
COUNT(*) Features,
round(SUM(ST_length(geometry)), 6) AS Sumlength
FROM "lines_test2"
The output attribute table will look like

The above query embrace the following pattern:
SELECT "layername1" AS Layer,
COUNT(*) Features,
round(SUM(ST_length(geometry)), 6) AS Sumlength
FROM "layername1"
UNION
SELECT "layername2" AS Layer,
COUNT(*) Features,
round(SUM(ST_length(geometry)), 6) AS Sumlength
FROM "layername2"
UNION
...
UNION
SELECT "layernameN" AS Layer,
COUNT(*) Features,
round(SUM(ST_length(geometry)), 6) AS Sumlength
FROM "layernameN"