Here is one possibility via base R,
xx <- '[[a, 2], [b, 5]]'
lapply(split(matrix(gsub('[[:punct:]]', '', unlist(strsplit(xx, ','))),
nrow = 2, byrow = T), 1:2),
function(i) list(i[[1]], as.numeric(i[[2]])))
#$`1`
#$`1`[[1]]
#[1] "a"
#$`1`[[2]]
#[1] 2
#$`2`
#$`2`[[1]]
#[1] " b"
#$`2`[[2]]
#[1] 5