Based on the recipe provided and assuming ingredients were weighed, the shallots had viable Lactobacillus/Lactoplantibacillus plantarum, one of many lactic acid bacteria (LAB), and began fermentation.
Typical lactic acid fermentation, like with sauerkraut, goes through the following (simplified) process [1]:
- Added salt inhibits some spoilage organisms, pathogens; draws out water and some sugars to form brine.
- Leuconostoc mesenteroides (LAB) begins fermentation, produces carbon dioxide and lactic acid that further inhibit spoilage and pathogen activity.
- Lactobacillus brevis, plantarum and others continue producing lactic acid in the conditions prepared by L. mesenteroides.
- Enough lactic acid is produced to slow some LAB activity and make the food shelf-stable, pH ~<4.6.
- Activity will continue until all sugars are consumed or pH reaches <3.5. L. plantarum is highly acid resistant, able to survive to pH ~3.0 and is the primary LAB active at this point. [1,2,3,4]
By using malt vinegar, you effectively skipped steps 1 to 4 with added acidity lowering the pH to the point where only L. plantarum was active. One study [5] stated that onions do not have the LAB needed for fermentation, and other studies [6,7] were able isolate LAB on shallots - alliums in general produce varying antibacterial compounds, and this may explain why your batch for onions didn't ferment.
Regarding safety, malt vinegar does have a lower acidity than regular distilled vinegar - the total acidity is made up of a range of food acids and is labelled simply as acetic acid %w/v - but this difference is nearly negligible in its effect on pH:

Table of retail vinegar acidities and pH values - from Comparison of α-amylase, α-glucosidase and lipase inhibitory activity of
different types of vinegar [8].
You would need to dilute the vinegars in 99 parts of water to increase the pH value by 1 - and even then, malt vinegar at pH ~2.9 would increase to ~3.9, still far more acidic than what C. botulinum and other foodborne pathogens are generally inhibited at. Of course, malt vinegar pH values will vary between manufacturers, though with the label claim of 5%, and from actual dilution conditions using shallots and onions, this is still far from a 99-part dilution:
...meaning that for the 500 g added allium, you're adding ~455 g water from onions and ~400 g water from shallots, both of which dilute the 600 mL vinegar by less than 1 part, less so with shallots. The higher sugar content in shallots also means more acid production from fermentation, if pH was not a limiting factor. Add to that the osmotic stress from 5% w/w salting, far higher than used in sauerkraut, and the concern for pathogen activity is negligible.
Now, for whether or not it's desirable for L. plantarum to be present, you can refer to the shallot fermentation studies [6,7] regarding probiotics, antioxidant production, and improved texture. If you do want to stop fermentation, you can simply pasteurise your jars in a water bath or microwave oven, stirring regularly, until the temperature at the very centre and throughout the container go above 63C, then loosely cover and allow to cool.
[1] Applications of Biotechnology to Fermented Foods: Report of an Ad Hoc Panel of the Board on Science and Technology for International Development - 5: Lactic Acid Fermentations. Keith H. Steinkraus.
https://www.ncbi.nlm.nih.gov/books/NBK234703/
[2] Acid Tolerance of Leuconostoc mesenteroides and Lactobacillus plantarum.
L.C. McDonald, H.P. Fleming, H.M. Hassan.
https://doi.org/10.1128/aem.56.7.2120-2124.1990
[3] Quantifying Variability in Growth and Thermal Inactivation Kinetics of Lactobacillus plantarum.
D. C. Aryani, H. M. W. den Besten, and M. H. Zwietering.
https://doi.org/10.1128%2FAEM.00277-16
[4] High tolerance of wild Lactobacillus plantarum and Oenococcus oeni strains to lyophilisation and stress environmental conditions of acid pH and ethanol.
Eva G-Alegría, Isabel López, J.Ignacio Ruiz, Julio Sáenz, Eva Fernández, Myriam Zarazaga, Marta Dizy, Carmen Torres, Fernanda Ruiz-Larrea.
https://doi.org/10.1016/S0378-1097(03)00854-1
[5] Lactic acid fermentation of onions.
J.S. Roberts, D.R. Kidd.
https://doi.org/10.1016/j.lwt.2004.05.007
[6] Isolation of lactic acid bacteria from Allium
cepa var. aggregatum and study of their
probiotic properties.
Nannu Shafakatullah, M. Chandra.
http://www.ijpsr.info/docs/IJPSR15-06-04-052.pdf
[7] Technical Factors Affecting To Pickle Shallot (Allium
Ascalonicum) Fermentation.
Nguyen Phuoc Minh.
https://www.jpsr.pharmainfo.in/Documents/Volumes/vol11issue03/jpsr11031938.pdf
[8] Comparison of α-amylase, α-glucosidase and lipase inhibitory activity of
different types of vinegar.
Yasmin, F., Abdul Razak, K.N., Abdul Samad, N., Widyawati, T. and Yusoff, N.A.
https://doi.org/10.26656/fr.2017.5(2).565