Back in AD&D 2nd ed there were no spell research rules, our DM just made his own. The cost per week (well, really it was "ten-day", a Forgotten Realms time unit) has based on inflating quickly with spell level - I forget it if was base_cost * level^2 or base_cost * 2^level, but it was exponential. I think base time was one ten-day per spell level, and that gave a fairly low chance of success with the idea that it would take multiple tries to succeed. The chance had something to do with spell level vs. highest level you could cast I think. It think you could also pay more to increase your chance of success, but that was more efficient in time and less efficient in gold.
Note that once you do the base time, you can get a reroll every week. So it's still intended to be a hard roll for high level spells.
To bring that to 5e, I'd suggest something like:
You must be able to cast a spell of a level to research. The DM is the arbiter of the spells level and if it is appropriate for your spell list.
Spell research takes a a minimum of spell-level weeks. It costs (base cost) * spell level^2 per week. One you reach you minimum you can make a success check. On failure, you can pay another week and try again. Any time you take a break, you need to spend one week without a success chance to get back up to speed.
Success chance is an Arcana or Religion check with a DC of 15+2*spell level. If you increase /all/ weekly costs by 50% you get advantage on the roll. If you increase /all/ weekly costs by 100% you get +5 on the roll. You can do both of these (+150%) if you like.
Some other modifiers should affect the roll, as per the DM. Suggestions would be having access to a magical library, having a magical laboratory, prayer/reflection spaces,a PC/apprentice/acolyte/helper using the Help action (must be available all during the week), observing or investigating a similar spell/creature power/effect.
Note: 2*spell level increases roughly at the level of proficiency+ability score modifiers until you hit around 9th (+4 prof and two ASI to max out your casting ability score). After that you're high level and you need to invest in the trappings of your class like libraries, temples, laboratories and the like to keep on pace.
Base cost would depend on how much spare money characters have in your campaign since that can vary by table pretty easily.
You know, I put the cost as "level^2", but since you also have a minimum number fo weeks it ends up being level^3 for the first check. That's probably too much for high level spells. I'd rather not take too much from the weekly cost, since that's the recurring bit to make your rolls, but maybe knocking down the base number of weeks makes sense. I'll leave my original so you can see my thought progression, but here's some alternates if you're comfortable with more complexity:
Per week cost: (base cost) * level^1.4 (so *1 at 1st to *21.67 at 9th).
Base time: 6 weeks / number of spell slots of that level you can cast. So researching a 5th level spell at 9th when you first get it will take a base of 6 weeks, but would only take 2 weeks at 18th when you have 3 of those slots.